結果

問題 No.709 優勝可能性
ユーザー AEnAEn
提出日時 2022-06-21 17:54:16
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 440 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 82,100 KB
実行使用メモリ 62,616 KB
最終ジャッジ日時 2024-04-22 12:37:25
合計ジャッジ時間 7,994 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
62,616 KB
testcase_01 AC 42 ms
53,436 KB
testcase_02 AC 42 ms
53,860 KB
testcase_03 AC 43 ms
54,504 KB
testcase_04 AC 44 ms
54,548 KB
testcase_05 AC 42 ms
55,120 KB
testcase_06 AC 43 ms
54,308 KB
testcase_07 AC 43 ms
54,868 KB
testcase_08 AC 43 ms
54,864 KB
testcase_09 AC 43 ms
54,788 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
N, M = map(int, input().split())
d = defaultdict(set)
m = [0]*M
n = [set() for _ in range(M)]
for i in range(N):
    R = list(map(int, input().split()))
    for j in range(M):
        if R[j] == m[j]:
            n[j].add(i)    
        if R[j] > m[j]:
            n[j].clear()
            n[j].add(i)
            m[j] = R[j]
    res = set()
    for k in range(M):
        res |= n[k]
    print(len(res))
0