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

[usaco2005 feb]Jersey Politics 牛的政治

题目描述

每个城市有 10001000 人,要求把给出的 3×k3\times k 个城市分为 33 份,每份 1000×k1000\times k 人,每个城市投票人数为 wiw_i,使至少两个城市的票数过半(不包括刚好一半)。

输入格式

  • Line 11:一个数 kk
  • Lines 23×k+12\dots 3\times k+1:每行一个数 wiw_i

输出格式

  • Lines 1k1\dots k:第一个区域的城市编号。
  • Lines k+12kk+1\dots 2k:第二个区域的城市编号。
  • Lines 2k+13k2k+1\dots 3k:第三个区域的城市编号。
2
510
500
500
670
400
310
1
2
3
6
5
4

样例说明

OUTPUT DETAILS:
Other solutions might be possible. Note that 「2  32\;3」 would NOT be a district won by the Jerseys, as they would be exactly half of the cows.

提示

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

题目来源

Gold