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

34870번 - Quadrants 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB70373066.667%

문제

This problem is about quadrants. What are quadrants? Let us begin with any two perpendicular lines $\ell$ and $\ell '$ in the plane $\mathbb{R}^2$. If you subtract the two lines $\ell$ and $\ell '$ from the whole plane $\mathbb{R}^2,ドル you obtain four connected, unbounded regions. Each of the four regions is called a quadrant. Note that the boundary of a quadrant does not belong to itself.

Now, consider a set $P$ of points in the plane $\mathbb{R}^2$. We are interested in quadrants defined by the set $P$ of points. Specifically, let $\mathcal{Q}$ be the set of quadrants $Q$ such that the boundary of $Q$ contains exactly three points of $P$. Each quadrant $Q ∈ \mathcal{Q}$ is called a $k$-quadrant if $Q$ contains exactly $k$ points of $P$ in its interior. The figure below shows an example in which the set $P$ consists of 14ドル$ points (small circles) and you can see a 5ドル$-quadrant $Q ∈ \mathcal{Q}$ (shaded in cyan), whose boundary contains three points $p, q, r ∈ P$.

Given a set $P$ of $n$ points as input, write a program that computes the number of $k$-quadrants for every 0ドル ≤ k ≤ n − 3$.

입력

Your program is to read from standard input. The input starts with a line containing a single integer $n$ (3ドル ≤ n ≤ 2,000円$), where $n$ is the number of points in the input set $P$. In each of the following $n$ lines, given are two integers $x$ and $y,ドル both ranging from $−10^6$ to 10ドル^6,ドル inclusively, that represent the $x$- and $y$-coordinates of an input point $(x, y)$ in $P$. You may assume that no two input points have the same coordinates, that there are no three points in $P$ lying in a line, and that there are no two perpendicular lines $\ell$ and $\ell '$ in the plane $\mathbb{R}^2$ such that $| \ell ∩ P| ≥ 2$ and $|\ell ' ∩ P| ≥ 2$.

출력

Your program is to write to standard output. Print exactly $n − 2$ lines. The $i$-th line of your output for each 1ドル ≤ i ≤ n − 2$ must contain a single integer that represents the number of $(i − 1)$-quadrants with respect to the input set $P$ of $n$ points.

제한

예제 입력 1

3
0 0
1 2
-1 4

예제 출력 1

2

예제 입력 2

4
0 0
1 2
-1 4
-1 1

예제 출력 2

0
4

예제 입력 3

10
47 20
4 30
3 21
44 12
46 34
18 18
19 50
48 23
22 3
19 22

예제 출력 3

2
12
20
18
20
30
28
16

노트

출처

ICPC > Regionals > Asia Pacific > Korea > 2025 ICPC Asia Seoul Regional K번

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

출처

대학교 대회

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

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