This commit is contained in:
2026-07-23 14:22:17 +08:00
commit f4d7f7899c
19 changed files with 407 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import sys
if __name__ == '__main__':
perl_amount, color_kind_amount = map(int, input().split())
color_counts: list[tuple[int, int]] = []
for i in range(color_kind_amount):
color_counts.append((i, int(input())))
color_counts.sort(key=lambda x: x[1])
colors: list[int] = []
for i, color_count in color_counts:
colors += [i + 1] * color_count
print(colors, file=sys.stderr)
for i in range(perl_amount // 2):
print(colors[i], colors[i + perl_amount // 2])