結果
| 問題 | No.709 優勝可能性 |
| コンテスト | |
| ユーザー |
Mr.Fuku
|
| 提出日時 | 2018-07-15 15:25:53 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 1,015 ms / 3,500 ms |
| コード長 | 685 bytes |
| 記録 | |
| コンパイル時間 | 839 ms |
| コンパイル使用メモリ | 20,784 KB |
| 実行使用メモリ | 50,092 KB |
| 最終ジャッジ日時 | 2026-05-06 18:02:23 |
| 合計ジャッジ時間 | 13,039 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
n,m = map(int,input().split())
max_status = [0]*m
candidate = [0]*m
count = 0
top_change = False
top_tie = False
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]
top_change = True
elif status[j]==max_status[j]:
candidate[j] += [i+1]
top_tie = True
if top_change:
ans = []
for j in candidate:
ans += j
count = len(set(ans))
top_change = False
top_tie = False
elif top_tie:
count += 1
top_tie = False
print(count)
Mr.Fuku