| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 4 초 | 1024 MB | 72 | 36 | 31 | 52.542% |
Because of some scheduling issues, there are $m$ different programming contests scheduled on the same day, at the same time. There are $n$ people who would like to participate in these contests, but because all contests happen simultaneously, each participant can only compete in one contest. Everyone wants to choose the contest in which to participate such that their expected winnings are maximized.
Every contest has a single cash prize for the winner (no-one else gets a prize). Furthermore, every participant has a skill level, which determines their winning probability. If the sum of skill levels over all participants in a contest is $t,ドル then the winning probability in this contest of a participant with skill level $s$ is $\frac{s}{t}$.
Find a distribution of the participants over the contests, such that it is impossible for any person to switch to a different contest and increase their expected winnings. It is guaranteed that such a distribution exists.
The input consists of:
The sum of all skill levels is at most \(10^9\).
For each contest, output the number of contestants that should participate in this contest, followed by the 1ドル$-based indices of the contestants that should participate in this contest.
If there are multiple valid solutions, you may output any one of them.
6 3 2 5 10 3 7 1 100 50 75
4 4 2 6 1 1 5 1 3
3 2 9 10 8 10 100
0 3 2 3 1
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2024 C번