DWITE Online Computer Programming Contest, December 2010, Problem 1
When talking about points on the Cartesian plane, most people tend to deal only with points with integer coordinates (i.e. points whose
The input will contain 5 lines, each line having 4 integers
The output will contain 5 lines, each line containing the number of points along the line (not including the endpoints) that fall on the integer coordinates.
Sample Input
Copy
0 0 2 2
-1 -2 1 1
Sample Output
Copy
1
0
Problem Resource: DWITE
Comments