結果

問題 No.2680 研究室配属
ユーザー 👑 hitonanodehitonanode
提出日時 2024-04-05 00:16:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 483 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 42,112 KB
最終ジャッジ日時 2024-04-05 00:16:49
合計ジャッジ時間 4,230 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,856 KB
testcase_01 AC 30 ms
9,856 KB
testcase_02 AC 29 ms
9,856 KB
testcase_03 AC 28 ms
9,984 KB
testcase_04 AC 29 ms
9,984 KB
testcase_05 AC 34 ms
10,112 KB
testcase_06 AC 37 ms
10,240 KB
testcase_07 AC 36 ms
10,240 KB
testcase_08 AC 36 ms
10,240 KB
testcase_09 AC 33 ms
10,112 KB
testcase_10 AC 73 ms
12,416 KB
testcase_11 AC 71 ms
11,776 KB
testcase_12 AC 89 ms
13,568 KB
testcase_13 AC 81 ms
11,264 KB
testcase_14 AC 97 ms
13,440 KB
testcase_15 AC 38 ms
10,240 KB
testcase_16 AC 180 ms
22,912 KB
testcase_17 AC 56 ms
10,880 KB
testcase_18 AC 122 ms
14,976 KB
testcase_19 AC 225 ms
27,648 KB
testcase_20 AC 201 ms
22,784 KB
testcase_21 AC 46 ms
10,496 KB
testcase_22 AC 158 ms
16,768 KB
testcase_23 AC 355 ms
42,112 KB
testcase_24 AC 354 ms
42,112 KB
testcase_25 AC 483 ms
42,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
a = list(map(int, input().split()))
T = [list(map(int, input().split())) for _ in range(n)]

ans = [-1] * n
for t in range(m):
    for i in range(n):
        if ans[i] != -1:
            continue
        
        v = T[i][t]
        if a[v]:
            a[v] -= 1
            ans[i] = v

print(*ans, sep=" ")
0