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

7841번 - Count Squares 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB101228.696%

문제

Given a set of points with integer coordinates $x_i, y_i,ドル $i = 1 \ldots N,ドル your program must find all the squares having each of four vertices in one of these points.

입력

Input file contains integer $N$ followed by $N$ pairs of integers $x_i$ $y_i$.

출력

Output file must contain a single integer -- number of squares found.

제한

  • $-10^4 \le x_i, y_i \le 10^4,ドル 1ドル \le N \le 2000$.
  • All points in the input are different.

예제 입력 1

4 0 0 4 3 -3 4 1 7

예제 출력 1

1

예제 입력 2

9
1 1 1 2 1 3 
2 1 2 2 2 3 
3 1 3 2 3 3

예제 출력 2

6

힌트

출처

ICPC > Regionals > Northern Eurasia > Far Eastern Russia Regional Contest > NEERC Far-Eastern Subregional 2005 C번

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

출처

대학교 대회

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

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