結果

問題 No.2680 研究室配属
ユーザー tassei903tassei903
提出日時 2024-03-20 21:37:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 616 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,584 KB
最終ジャッジ日時 2024-03-20 21:37:19
合計ジャッジ時間 3,227 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 AC 42 ms
59,840 KB
testcase_04 AC 47 ms
59,832 KB
testcase_05 AC 47 ms
64,136 KB
testcase_06 AC 49 ms
66,204 KB
testcase_07 AC 49 ms
66,204 KB
testcase_08 AC 49 ms
64,132 KB
testcase_09 AC 47 ms
64,028 KB
testcase_10 AC 66 ms
76,160 KB
testcase_11 AC 65 ms
76,164 KB
testcase_12 AC 69 ms
76,032 KB
testcase_13 AC 66 ms
76,164 KB
testcase_14 AC 71 ms
76,160 KB
testcase_15 AC 53 ms
66,328 KB
testcase_16 AC 94 ms
79,104 KB
testcase_17 AC 65 ms
76,036 KB
testcase_18 AC 82 ms
77,184 KB
testcase_19 AC 111 ms
80,000 KB
testcase_20 AC 99 ms
78,976 KB
testcase_21 AC 59 ms
70,564 KB
testcase_22 AC 90 ms
78,080 KB
testcase_23 AC 142 ms
83,584 KB
testcase_24 AC 142 ms
83,584 KB
testcase_25 AC 150 ms
83,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
n, m = na()
a = na()
t = [[x for x in na()] for i in range(n)]
ans = [-1] * n
for i in range(m):
    for j in range(n):
        if ans[j] != -1:
            continue
        if a[t[j][i]] > 0:
            ans[j] = t[j][i] 
            a[t[j][i]] -= 1

print(*ans)
0