10865 - Brownie Points


Difficulty : easy

Solution Description :

Ad hoc problem

Read the line
"their lines cross the point whose coordinates are given at the center of the input sequence of points for this case."

Input
11
3 2
3 3
3 4
3 6
2 -2
1 -3
0 0
-3 -3
-3 -2
-3 -4
3 -7
So the center point is (1 -3) you can find it m=n/2 + 1 = 11/2 + 1 = 6 the center point at position 6

image
Now for each input point x[i] and y[i] you need to find the point place in which side
if it is in Stan's side then increment the counter of Stan's score
if it is in Ollie's side then increment the counter of Ollie's score
Example:
(3,2) -> top-right - Stan's Score
(3,3) -> top-right - Stan's Score
(3,4) -> top-right - Stan's Score
(3,6) -> top-right - Stan's Score
(2,-2) -> top-right - Stan's Score
(1,-3) -> center (no need to count score)
(0,0)-> top-left - Ollie's Score
(-3,-3)-> in X axis (no need to count score)
(-3,-2)-> top-left - Ollie's Score
(-3,-4) -> bottom-left - Stan's Score
(3,-7) -> bottom-right - Ollie's Score