Universal Cup Judging System

Universal Cup

Time Limit: 2.0 s Memory Limit: 1024 MB Total points: 100
Statistics

在 AMPPZ 2025 中,來自 $27$ 所機構的 $80$ 支隊伍將同場競技。這些機構的縮寫分別為 UW, UJ, UWR, MAP, PW, AGH, PG, NLU, PUT, PO, PWR, SGGW, UMCS, UR, ZUT, DTP, GOO, HUA, KUL, PL, PM, PS, UAM, UG, UMK, UO, WAT。以下是展示每所機構隊伍數量的完整表格*:

機構全名 縮寫 隊伍數量
Uniwersytet Warszawski UW 11
Uniwersytet Jagielloński UJ 9
Uniwersytet Wrocławski UWR 8
Mistrzostwa w Algorytmice i Programowaniu (secondary schools) MAP 7
Politechnika Warszawska PW 6
Akademia Górniczo-Hutnicza im. Stanisława Staszica w Krakowie AGH 5
Politechnika Gdańska PG 4
Wyższa Szkoła Biznesu - National-Louis University NLU 3
Politechnika Poznańska PUT 3
Politechnika Opolska PO 2
Politechnika Wrocławska PWR 2
Szkoła Główna Gospodarstwa Wiejskiego w Warszawie SGGW 2
Uniwersytet Marii Curie-Skłodowskiej w Lublinie UMCS 2
Uniwersytet Rzeszowski UR 2
Zachodniopomorski Uniwersytet Technologiczny w Szczecinie ZUT 2
Digital Technology Poland DTP 1
Google GOO 1
Huawei HUA 1
Katolicki Uniwersytet Lubelski Jana Pawła II KUL 1
Politechnika Łódzka PL 1
Politechnika Morska w Szczecinie PM 1
Politechnika Śląska PS 1
Uniwersytet im. Adama Mickiewicza w Poznaniu UAM 1
Uniwersytet Gdański UG 1
Uniwersytet Mikołaja Kopernika w Toruniu UMK 1
Uniwersytet Opolski UO 1
Wojskowa Akademia Techniczna WAT 1

*在本題準備階段與實際比賽之間,隊伍名單可能會有些微變動。

比賽大廳是一個 $8 \times 10$ 的網格,由 $8$ 列組成,每列有 $10$ 個工作站。為了防止未經授權的交流,主辦方必須找出一種座位安排方案,使得來自同一所機構的隊伍不會坐在相鄰位置——亦即既不共用邊,也不共用角。

觀眾有他們最喜愛的隊伍——來自輸入中給出縮寫的那所機構的隊伍。攝影團隊已經在比賽大廳的左上角架設好了攝影機,因此來自輸入中指定機構的一支隊伍必須坐在那裡。

請找出滿足給定條件的任意一種隊伍安排方案。

輸入

唯一的一行包含一個由 $2$ 到 $4$ 個大寫字母組成的單詞——最受喜愛機構的縮寫(上述 $27$ 所機構之一)。

輸出

輸出找到的隊伍安排方案——共 $8$ 行,每行有 $10$ 個以空格分隔的單詞(機構縮寫)。第一行的第一個單詞必須與輸入中提供的最受喜愛機構相符。若存在多組解,輸出其中任意一組即可。

提示

在範例測試中,觀眾最喜愛的是 Uniwersytet Wrocławski†。下方給出的輸出包含了正確的縮寫與數量,且 UWR 確實出現在左上角。然而,這不是一個合法的輸出,因為在許多地方,來自同一所機構的隊伍彼此相鄰了。在下方表格中,三個衝突的例子以粗體標出。

UWR MAP MAP UJ PL UW UW SGGW ZUT GOO
MAP PUT UR KUL UW UW PM AGH UWR AGH
PS UJ UWR UW UWR MAP UWR PG UWR PWR
PW HUA PW AGH PG DTP UW UW UW PWR
MAP UG NLU UJ PUT UAM UW UJ UJ UW
NLU ZUT PW WAT UWR AGH UMCS UR UJ AGH
PUT UJ SGGW PG PW MAP PO MAP UJ UWR
UMCS PO PW PW UO UW PG UJ NLU UMK

†也許是因為 UWR 的其中一支隊伍贏得了上一屆 AMPPZ。

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.