RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00608

Kućice

Unrated 레이팅 미적용
난이도
1s
시간 제한
512MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

Everyone knows that every other booth at the Zagreb Christmas Market was
actually set up just by pulling the right strings. This year the authorities have
decided to send an inspection to penalize the booths that were set up illegitimately.
There are \(n\) booths, which can be represented by points in the plane, where no
three of them lie on the same line. The authorities will identify the booths ruled by
corruption and fence them off from the rest of the town. The fence will surround
the mentioned booths and it will form the shape of the smallest convex polygon
containing all of them. In other words, the fence can be thought of as the boundary
of the convex hull of the chosen set of points. Unfortunately, it’s possible that
some of the innocent booths become fenced off as well.
Before an \(on-si\)te inspection, the authorities estimate that the probability of corruption of any particular
booth is 50%. Having this in mind, they wonder what is the expected number of booths which will end
up being fenced off. The expected value is defined by multiplying the probability of a certain subset
of booths being chosen by the number of booths fenced off in that choice, and summing this up for all
possible choices of the subset. Of course, if the chosen subset consists of less than three points, the convex
hull is degenerate, i.e. a segment, point or the empty set.
It can be proven that the desired expected value can be written in the form ^{m}
_{2}{n}} ^{for} ^{some} ^{positive} ^{integer
\(m\). The authorities would like to know the expected value, so they kindly ask you to compute the value of
\(m\). Since the answer can be very large, you should print it modulo \(10^{9} + 7\).

제약

Subtask 1 (10 points): All points are on the boundary of the convex hull of all points and \(n \ge 3\).

Subtask 2 (30 points): All points except the first one are on the boundary of the convex hull of all points, which is is the interior, and \(n \ge 4\), \(x_{1} = y_{1} = 0\).

Subtask 3 (10 points): \(1 \le n \le 15\)

Subtask 4 (30 points): \(1 \le n \le 100\)

Subtask 5 (30 points): No additional constraints.

입력 형식

The first line contains a positive integer \(n\) (\(1 \le n \le 1000\)), the number of booths.
The \(i-th\) of the next \(n\) lines contains a pair of positive integers \(x@@RISE_MATH_BLOCK_0@@i\) (|\(x@@RISE_MATH_BLOCK_1@@i\)| ≤\(10^{6}\)), which represent the
\(x\) and \(y\) coordinates of the \(i-th\) booth, respectively. No two booths have the same location.
No three booths will lie on the same line.

출력 형식

In the only line print the number \(m\) described above, modulo \(10^{9} + 7\).

서브태스크
서브태스크점수설명

1

10점

All points are on the boundary of the convex hull of all points and \(n \ge 3\).

2

30점

All points except the first one are on the boundary of the convex hull of all points, which is is the interior, and \(n \ge 4\), \(x_{1} = y_{1} = 0\).

3

10점

\(1 \le n \le 15\)

4

30점

\(1 \le n \le 100\)

5

30점

No additional constraints.

예제 1
입력
1
5 5
출력
1
예제 2
입력
3
-1 -1
1 -1
0 1
출력
12
예제 3
입력
5
0 0
-1 0
2 -1
3 2
0 3
출력
83
설명

Clarification of the first example:
There is a probability of 50% that the first and only booth gets fenced off, so the expected value is 1
2.
Clarification of the second example:
There are eight possible choices for a subset, and the number of fenced off booths for those choices is
0, 1, 1, 1, 2, 2, 2, 3. The expected value is then 1
8(0 + 1 + 1 + 1 + 2 + 2 + 2 + 3) = 12
8 .

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2021/2022 Contest 3

평가 및 의견

Kućice

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Kućice

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8