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

25279번 - Treehouse 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 (추가 시간 없음) 1024 MB65342856.000%

문제

Pusheen wants to build a treehouse in the Treehouse forest in Brunnshög in the north of Lund. The treehouse should to be built on a square platform in the treetops, with a tree in each of the four corners. When Pusheen has picked a spot to built the treehouse, trees that are located between the corners will be cut down. Pusheen has a 2D map with all the (x, y)-coordinates of the trees in the forest. In how many places can they build a square treehouse?

입력

The first line has an integer 4ドル \leq N \leq 2,円 000 ,ドル the number of trees in the forest. Each of the following $N$ lines has two integers $-10,000\leq x_i, y_i \leq 10,000,ドル the x- and y-coordinates of tree $i$. All points are distinct.

출력

An integer, the number of suitable spots for a tree house.

제한

서브태스크

번호배점제한
120

$N \leq 50$

280

No further restrictions

예제 입력 1

9
1 5
1 7
3 1
3 5
3 7
5 7
6 2
7 3
7 6

예제 출력 1

2

힌트

Illustration of the two possible treehouse locations in sample 1.

출처

Contest > Swedish Coding Cup > LTH Challenge 2022 C번

  • 문제를 만든 사람: Maj Stenmark, Måns Magnusson

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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