結果

問題 No.709 優勝可能性
ユーザー prd_xxxprd_xxx
提出日時 2018-06-29 23:11:00
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 450 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 140,080 KB
最終ジャッジ日時 2023-09-13 15:37:21
合計ジャッジ時間 7,459 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
75,560 KB
testcase_01 AC 69 ms
71,016 KB
testcase_02 AC 69 ms
71,096 KB
testcase_03 AC 69 ms
71,516 KB
testcase_04 AC 69 ms
71,308 KB
testcase_05 AC 68 ms
71,200 KB
testcase_06 AC 69 ms
71,372 KB
testcase_07 AC 67 ms
71,184 KB
testcase_08 AC 69 ms
71,388 KB
testcase_09 AC 67 ms
71,476 KB
testcase_10 AC 3,406 ms
140,080 KB
testcase_11 AC 598 ms
97,092 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
src = [list(map(int,input().split())) for i in range(N)]

maxs = [0] * M
ss = [set() for i in range(M)]
ans = []
for i,skills in enumerate(src):
    for j,skill in enumerate(skills):
        if skill > maxs[j]:
            maxs[j] = skill
            ss[j] = set([i])
        elif skill == maxs[j]:
            ss[j].add(i)
    tmp = set()
    for s in ss:
        tmp |= s
    ans.append(len(tmp))
print(*ans,sep='\n')
0