QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22659. Jersey 정치

Statistics

최신 Jersey와 Holstein 소 인구조사에서 Wisconsin 소들은 Barn of Representatives에 세 칸을 얻었습니다. Jersey 소는 현재 주의 선거구 재편 위원회를 장악합니다. 주를 같은 크기의 세 선거구로 나눠 적어도 둘에서 선거 승리를 보장하려 합니다.

Wisconsin에는 소가 각각 $1,000$마리인 도시 $3*K$개($1 \le K \le 60$)가 있고 번호는 $1..3*K$입니다. 각 도시 Jersey 수($0..1,000$)는 알려져 있습니다. 도시 $K$개씩의 세 선거구로 나눠 적어도 둘에서 Jersey가 과반수가 되도록 하세요.

모든 입력 데이터에는 답이 있습니다.

입력

  • $1$번째 줄: 정수 하나 $K$.

  • $2..3*K+1$번째 줄: 한 줄에 각 도시의 Jersey 수인 정수 하나. $i+1$번째 줄은 도시 $i$의 소 인구조사입니다.

출력

  • $1..K$번째 줄: 첫 선거구 도시 번호를 한 줄에 하나씩 $K$줄.

  • $K+1..2K$번째 줄: 둘째 선거구 도시 번호를 한 줄에 하나씩 $K$줄.

  • $2K+1..3K$번째 줄: 셋째 선거구 도시 번호를 한 줄에 하나씩 $K$줄.

예제

입력 1

2
510
500
500
670
400
310

출력 1

1
2
3
6
5
4

참고

다른 답도 가능합니다. 2 3은 Jersey가 이기는 선거구가 아닙니다. 정확히 절반이기 때문입니다.

문제 작성: Coaches, 2004년

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.