結果
| 問題 | No.709 優勝可能性 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-22 13:39:56 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 713 bytes |
| 記録 | |
| コンパイル時間 | 561 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 44,248 KB |
| 最終ジャッジ日時 | 2026-05-29 19:22:33 |
| 合計ジャッジ時間 | 10,845 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 12 TLE * 1 -- * 9 |
ソースコード
def solve(N, M, Rs):
ans = []
maxes = {m: [0, set()] for m in range(0, M)}
for ri, r in enumerate(Rs):
for m, cr in enumerate(r.split(" ")):
cmax = maxes[m][0]
p = int(cr)
if p > cmax:
maxes[m][0] = p
maxes[m][1] = set()
maxes[m][1].add(ri)
elif p == cmax:
maxes[m][1].add(ri)
count = set()
for mm in maxes.values():
count.update(mm[1])
ans.append(len(count))
return ans
if __name__ == "__main__":
l = input().split(" ")
N, M = int(l[0]), int(l[1])
Rs = [input() for _ in range(0, N)]
[print(s) for s in solve(N, M, Rs)]