結果
問題 | No.709 優勝可能性 |
ユーザー |
👑 |
提出日時 | 2022-10-28 19:15:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 399 ms / 3,500 ms |
コード長 | 601 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 106,716 KB |
最終ジャッジ日時 | 2024-07-05 22:29:35 |
合計ジャッジ時間 | 6,870 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
n, m = map(int, input().split())ans = 0ma = [-1] * mind = [[] for _ in range(m)]cnt = [0] * nfor i in range(n):R = list(map(int, input().split()))for j, r in enumerate(R):if r > ma[j]:ma[j] = rcnt[i] += 1if cnt[i] == 1:ans += 1for k in ind[j]:cnt[k] -= 1if cnt[k] == 0:ans -= 1ind[j] = [i]elif r == ma[j]:ind[j].append(i)cnt[i] += 1if cnt[i] == 1:ans += 1print(ans)