Problem D
Seat Allocation
Languages
da
en
Consider an election where
where
Input
On the first line of input: the number
Test groups
There are two tests groups. The inputs in test group 1,
worth 80 of the 100 total points, satisfy the additional
constraint
Output
The seat distribution, one per line, in the format shown in the example. The order is the same as in the input.
Explanation of Sample Input 4
Party 1 gets the first seat because it has the most
votes; its quotient is recalculated to
Sample Input 1 | Sample Output 1 |
---|---|
2 2 10 10000000 |
0 2 |
Sample Input 2 | Sample Output 2 |
---|---|
2 3 12 11 |
2 1 |
Sample Input 3 | Sample Output 3 |
---|---|
2 4 12 11 |
2 2 |
Sample Input 4 | Sample Output 4 |
---|---|
2 4 17 10 |
3 1 |
Sample Input 5 | Sample Output 5 |
---|---|
4 14 38 35 36 37 |
4 3 3 4 |