#abc187b. B - Gentle Pairs
B - Gentle Pairs
问题陈述
在 平面上,我们有 个点,编号从 到 。点 位于 ,并且这 个点的 坐标是两两不同的。
找出满足以下条件的整数对 的数量:
- 通过点 和点 的直线斜率在 和 之间(包括 和 )。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
On the -plane, We have points numbered to . Point is at , and the -coordinates of the points are pairwise different.
Find the number of pairs of integers that satisfy the following condition:
- The line passing through Point and Point has a slope between and (inclusive).
Constraints
- All values in input are integers.
- for .
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
3
0 0
1 2
2 1
Sample Output 1
2
The slopes of the lines passing through and , passing through and , and passing through and are , , and , respectively.
Sample Input 2
1
-691 273
Sample Output 2
0
Sample Input 3
10
-31 -35
8 -36
22 64
5 73
-14 8
18 -58
-41 -85
1 -88
-21 -85
-11 82
Sample Output 3
11