結果
問題 | No.709 優勝可能性 |
ユーザー |
|
提出日時 | 2021-10-14 09:57:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 406 ms / 3,500 ms |
コード長 | 545 bytes |
コンパイル時間 | 174 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 99,204 KB |
最終ジャッジ日時 | 2024-09-17 16:28:21 |
合計ジャッジ時間 | 6,051 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
N,M=map(int, input().split())Max=[0]*MList=[[] for _ in range(M)]Cnt=[0]*Ncnt=0for n in range(N):for i,r in enumerate(map(int, input().split())):if Max[i]<r:Max[i]=rfor m in List[i]:Cnt[m]-=1if Cnt[m]==0:cnt-=1List[i]=[n]if Cnt[n]==0:cnt+=1Cnt[n]+=1elif Max[i]==r:List[i].append(n)if Cnt[n]==0:cnt+=1Cnt[n]+=1print(cnt)