湖南大学ACM程序设计新生杯大赛 - A Array
2018-01-23 19:34
253 查看
链接:https://www.nowcoder.com/acm/contest/55/A
来源:牛客网
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 131072K,其他语言262144K
64bit IO Format: %lld
where a[i] (1<=i<=n) is positive integer.
Count the number of pair (l,r) such that a[l],a[l+1],...,a[r] can be rearranged to form a geometric seq
4000
uence.
Geometric sequence is an array where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the common ratio. i.e. A = [1,2,4,8,16] is a geometric sequence.
来源:牛客网
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 131072K,其他语言262144K
64bit IO Format: %lld
题目描述
Given an array A with length n a[1],a[2],...,awhere a[i] (1<=i<=n) is positive integer.
Count the number of pair (l,r) such that a[l],a[l+1],...,a[r] can be rearranged to form a geometric seq
4000
uence.
Geometric sequence is an array where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the common ratio. i.e. A = [1,2,4,8,16] is a geometric sequence.
输入描述:
The first line is an integer n (1 <= n <= 100000). The second line consists of n integer a[1],a[2],...,a where a[i] <= 100000 for 1<=i<=n.
输出描述:
An integer answer for the problem.
相关文章推荐
- 湖南大学ACM程序设计新生杯大赛(同步赛)D - Number
- 湖南大学ACM程序设计新生杯大赛(同步赛)A-Array 【证明+暴力】
- 湖南大学ACM程序设计新生杯大赛(同步赛)E - Permutation
- 湖南大学ACM程序设计新生杯大赛(C-Do you like banana?)
- 湖南大学ACM程序设计新生杯大赛 - B Build
- 湖南大学ACM程序设计新生杯大赛(同步赛)C-Do you like Banana ? 【几何】
- 湖南大学ACM程序设计新生杯大赛(同步赛)I - Piglet treasure hunt Series 1
- 湖南大学ACM程序设计新生杯大赛 - E Permutation (匈牙利算法)
- 湖南大学ACM程序设计新生杯大赛(同步赛) D -Number 【打表+暴力】
- 湖南大学ACM程序设计新生杯大赛(同步赛)B - Build
- 湖南大学ACM程序设计新生杯大赛 - Yuanyuan Long and His Ballons(环形染色问题)
- 湖南大学ACM程序设计新生杯大赛(同步赛)E-Permutation【打表+规律】
- 湖南大学ACM程序设计新生杯大赛(同步赛)L - Liao Han
- 湖南大学ACM程序设计新生杯大赛(同步赛)G-The heap of socks【排序】
- 湖南大学ACM程序设计新生杯大赛(同步赛)A - Array
- 湖南大学ACM程序设计新生杯大赛(同步赛)H-Yuanyuan Long and His Ballons【公式】
- 湖南大学ACM程序设计新生杯大赛(同步赛)J - Piglet treasure hunt Series 2
- 湖南大学ACM程序设计新生杯大赛(同步赛)H-Yuanyuan Long and His Ballons【公式】
- 2017湖南大学ACM程序设计新生杯大赛 - B - Build (并查集&&贪心)
- 湖南大学ACM程序设计新生杯大赛(同步赛) I-Piglet treasure hunt Series 1【BFS】