結果
問題 | No.709 優勝可能性 |
ユーザー |
|
提出日時 | 2022-03-21 11:58:07 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 397 ms / 3,500 ms |
コード長 | 724 bytes |
コンパイル時間 | 371 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 158,108 KB |
最終ジャッジ日時 | 2024-10-08 16:19:21 |
合計ジャッジ時間 | 6,777 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
N,M = map(int,input().split())lsR = [list(map(int,input().split())) for i in range(N)]lsTF = []cnt = 0lsmax = [[-float('INF')] for i in range(M)]for i in range(N):cnt += 1lsp = lsR[i]TF = [True]*(M)remls = set()for j in range(M):if lsmax[j][0] > lsp[j]:TF[j] = Falseelif lsmax[j][0] == lsp[j]:lsmax[j].append(i)else:lose = lsmax[j][1:]for k in lose:lsTF[k][j] = Falseremls.add(k)lsmax[j] = [lsp[j],i]for rem in remls:if lsTF[rem].count(True) == 0:cnt -= 1if TF.count(True) == 0:cnt -= 1lsTF.append(TF)print(cnt)