Logo
(追記) (追記ここまで)

11714번 - Midpoint 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
10 초 256 MB245492828.866%

문제

One day, you found L + M + N points on a 2D plane, which you named A1, . . . , AL, B1, . . . , BM, C1, . . . ,CN. Note that two or more points of them can be at the same coordinate. These were named after the following properties:

  • the points A1, . . . , AL were located on a single straight line,
  • the points B1, . . . , BM were located on a single straight line, and
  • the points C1, . . . ,CN were located on a single straight line.

Now, you are interested in a triplet (i, j, k) such that Ck is the midpoint between Ai and Bj. Your task is counting such triplets.

입력

The first line contains three space-separated positive integers L, M, and N (1 ≤ L, M, N ≤ 105). The next L lines describe A. The i-th of them contains two space-separated integers representing the x-coordinate and the y-coordinate of Ai. The next M lines describe B. The j-th of them contains two space-separated integers representing the x-coordinate and the y-coordinate of Bj. The next N lines describe C. The k-th of them contains two space-separated integers representing the x-coordinate and the y-coordinate of Ck. It is guaranteed that the absolute values of all the coordinates do not exceed 105.

출력

Print the number of the triplets which fulfill the constraint.

제한

예제 입력 1

2 2 3
0 0
2 0
0 0
0 2
0 0
1 1
1 1

예제 출력 1

3

예제 입력 2

4 4 4
3 5
0 4
6 6
9 7
8 2
11 3
2 0
5 1
4 3
7 4
10 5
1 2

예제 출력 2

8

예제 입력 3

4 4 4
0 0
3 2
6 4
9 6
7 14
9 10
10 8
13 2
4 2
5 4
6 6
8 10

예제 출력 3

3

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Spring Contest > JAG Spring Contest 2015 I번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /