#P1675. [USACO05FEB] Jersey Politics G
[USACO05FEB] Jersey Politics G
Description
In Wisconsin, there are cities, labeled in order. Each city has cows. Jersey owns () cows in these cities.
You need to evenly split these cities into groups. Clearly, each group then has a total of cows.
You must ensure that in at least two groups, the total number of cows owned by Jersey is strictly greater than half of .
Find any valid assignment.
Input Format
The first line contains an integer .
Then follow lines, each containing one integer .
Output Format
Output three groups. For the -th group, output lines, each line containing the index of a city assigned to the -th region.
2
510
500
500
670
400
310
1
2
3
6
5
4
Hint
There may be multiple valid solutions; output any one of them.
Constraints: .
Translated by ChatGPT 5
京公网安备 11011102002149号