## DWITE '06 R5 #1 - Points on a Line

View as PDF

Points: 7
Time limit: 0.6s
Memory limit: 16M

Problem type
##### DWITE Online Computer Programming Contest, February 2006, Problem 1

In this particular problem, you will be given a set of points that lie on the Cartesian plane. Given two points, and , determine how many points in the set lie on the line created by and .

The input will contain one set of data. The first line will contain , the number of points in the set, . The next lines will contain two integers each, and , which represent the -coordinate and the -coordinate of the point. . After these lines, there will be five lines that will contain the coordinates of the points and ; and are not part of the original set. and .

The output will contain five lines of data. Each line will contain the number of points in the set that lie on the line created by and .

#### Sample Input

12
0 0
-1 3
1 3
1 7
2 9
3 -1
6 0
3 1
5 3
3 5
3 8
6 6
2 2 0 4
3 0 3 9
2 2 3 3
0 4 1 5
3 -3 4 -2

#### Sample Output

2
4
2
1
1

#### Sample Input Analysis

There are points [ and ] from the set that lie on the line created by the two points and .
There are points [ and ] from the set that lie on the line created by the two points and .
There are points [ and ] from the set that lie on the line created by the two points and .
There is point [] from the set that lie on the line created by the two points and .
There is point [] from the set that lie on the line created by the two points and .

## Comments

There are no comments at the moment.