시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 56 4 4 18.182%

문제

정문이는 2차원 평면에 N개의 선을 그리려 한다. 그런데 선이 너무 많아 하나하나 다 그리려면 매우 힘들다는 것을 깨달았다. 그래서 서로 이어진 선 같은 경우에는 하나의 선으로 생각하여서 그리려 한다.

예를 들어 (1,1) 에서 (3,3)로 가는 선이 있고 (2,2)에서 (4,4)으로 가는 선이 있다면 이는 이어서 그릴 수 있으므로 하나의 선으로 생각할 수 있을 것이다. N개의 선의 정보가 주어져 있을 때, 몇 개의 선으로 그릴 수 있는지 판단하는 프로그램을 작성하시오.

입력

첫째 줄에 선분의 개수 N(1<=N<=10000) 이 주어지고 그리고 둘째 줄부터 N+1번째 줄까지 네 개의 소수가(x1, y1, x2, y2) 주어진다(최대 소숫점 둘째 자리까지). 이 말은 (x1,y1) 에서 (x2,y2)까지 선이 이어진다는 것이다. (좌표는 0 이상 1000 이하이고 선의 길이는 0보다 크다.)

출력

선의 개수를 출력하시오.

예제 입력 1

3
1.0 10.0 3.0 14.0
0.0 0.0 20.0 20.0
10.0 28.0 2.0 12.0

예제 출력 1

2

힌트

W3sicHJvYmxlbV9pZCI6IjIwMTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMxMjBcdWFkZjhcdWI5YWNcdWFlMzAiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YzgxNVx1YmIzOFx1Yzc3NFx1YjI5NCAyXHVjYzI4XHVjNmQwIFx1ZDNjOVx1YmE3NFx1YzVkMCBOXHVhYzFjXHVjNzU4IFx1YzEyMFx1Yzc0NCBcdWFkZjhcdWI5YWNcdWI4MjQgXHVkNTVjXHViMmU0LiBcdWFkZjhcdWI3ZjBcdWIzNzAgXHVjMTIwXHVjNzc0IFx1YjEwOFx1YmIzNCBcdWI5Y2VcdWM1NDQgXHVkNTU4XHViMDk4XHVkNTU4XHViMDk4IFx1YjJlNCBcdWFkZjhcdWI5YWNcdWI4MjRcdWJ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