题目链接:http://codeforces.com/problemset/problem/567/C C. Geometric Progression time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarp loves geometric progressions very much. Since he was on…
Geometric Progression Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 567C Description Polycarp loves geometric progressions very much. Since he was only three years old, he loves only t…
C. Geometric Progression Time Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/567/problem/C Description Polycarp loves geometric progressions very much. Since he was only three years old, he loves only the progressions of length…
题目大意:输入两个整数 n 和 k ,接下来输入n个整数组成的序列.求该序列中三个数 满足条件的子串个数(要求字串由三个整数a,b,c组成,其中 c = k * b = k * k * a). 思路:枚举中间的数,然后分别求出前面和后面满足条件的数的个数,将两数相乘,然后累加积即可. 由于题目中给出的数据范围较大,且有负数,故用MAP来影射输入的序列中的每个元素. 代码: #include<iostream> #include<cstdio> #include<cstring…
time limit per test : 1 second memory limit per test : 256 megabytes input : standard input output : standard output Problem Description Polycarp loves geometric progressions very much. Since he was only three years old, he loves only the progression…
C. Geometric Progression time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarp loves geometric progressions very much. Since he was only three years old, he loves only the progressions o…