UOJ Logo 黑暗爆炸OJ

DARKBZOJ

#1732. [usaco2005 feb]Jersey Politics 牛的政治

统计 下载数据

Description

每个城市有1000人,要求把给出的3*K个城市分为3份,每份1000*k人,每个城市投票人数为Wi,使至少两个城市的票数过半(不包括刚好一半)。

Input

* Line 1: 一个数K * Lines 2..3*K+1: 每行一个数Wi

Output

* Lines 1..K: 第一个区域的城市编号

* Lines K+1..2K: 第二个区域的城市编号 * Lines 2K+1..3K: 第三个区域的城市编号

Sample Input

2
510
500
500
670
400
310

Sample Output

1
2
3
6
5
4

OUTPUT DETAILS:

Other solutions might be possible. Note that "2 3" would NOT be a district won by
the Jerseys, as they would be exactly half of the cows.

Hint

本题为SJ,请提交到 http://acm.pku.edu.cn/JudgeOnline/problem?id=2454

Source

Gold