#P2165. [AHOI2009] 飞行棋
[AHOI2009] 飞行棋
Description
Given several points on a circle and the arc lengths between consecutive points in circular order (each a positive integer), determine how many distinct rectangles can be formed by choosing four of these points as vertices.
Input Format
The first line contains a positive integer , the number of points. Each of the next lines gives the length of the arc between consecutive points along the circle, in circular order.
Output Format
Output a single integer: the number of distinct rectangles formed.
8
1
2
2
3
1
1
3
3
3
Hint
。

Translated by ChatGPT 5
京公网安备 11011102002149号