結果

問題 No.2680 研究室配属
ユーザー kjqwkjqw
提出日時 2023-12-13 15:47:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 602 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 42,240 KB
最終ジャッジ日時 2024-03-18 21:54:13
合計ジャッジ時間 5,466 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,112 KB
testcase_01 AC 28 ms
10,112 KB
testcase_02 AC 28 ms
10,112 KB
testcase_03 AC 29 ms
10,112 KB
testcase_04 AC 31 ms
10,112 KB
testcase_05 AC 39 ms
10,240 KB
testcase_06 AC 41 ms
10,368 KB
testcase_07 AC 41 ms
10,368 KB
testcase_08 AC 40 ms
10,368 KB
testcase_09 AC 34 ms
10,240 KB
testcase_10 AC 99 ms
12,544 KB
testcase_11 AC 91 ms
11,904 KB
testcase_12 AC 122 ms
13,696 KB
testcase_13 AC 94 ms
11,392 KB
testcase_14 AC 128 ms
13,568 KB
testcase_15 AC 43 ms
10,368 KB
testcase_16 AC 275 ms
23,168 KB
testcase_17 AC 69 ms
11,008 KB
testcase_18 AC 169 ms
15,104 KB
testcase_19 AC 361 ms
27,776 KB
testcase_20 AC 293 ms
22,912 KB
testcase_21 AC 52 ms
10,624 KB
testcase_22 AC 215 ms
16,896 KB
testcase_23 AC 581 ms
42,240 KB
testcase_24 AC 586 ms
42,240 KB
testcase_25 AC 602 ms
42,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))
T = [list(map(int, input().split())) for _ in range(N)]

T1 = [-1 for i in T]
T2 = [0 for _ in range(M)]

for i in range(M):
  for j in range(N):
    if T2[T[j][i]] < A[T[j][i]] and T1[j] == -1:
      T1[j] = T[j][i]
      T2[T[j][i]] += 1
print(*T1)
0