結果

問題 No.709 優勝可能性
ユーザー Mr.Fuku
提出日時 2018-07-15 15:16:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 599 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,824 KB
最終ジャッジ日時 2024-11-06 13:11:46
合計ジャッジ時間 17,501 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other AC * 16 TLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
max_status = [0]*m
candidate = [0]*m
count = 0
calc_flag = True

for i in range(n):
    status = list(map(int,input().split()))
    for j in range(m):
        if status[j]>max_status[j]:
            max_status[j] = status[j]
            candidate[j] = [i+1]
            calc_flag = True
        elif status[j]==max_status[j]:
            candidate[j] += [i+1]
            calc_flag = True
    
    if calc_flag:
        ans = []
        for j in candidate:
            ans += j
        ans = set(ans)
        count = len(ans)
        calc_flag = False
    print(count)
0