結果
問題 | No.709 優勝可能性 |
ユーザー |
![]() |
提出日時 | 2018-07-15 15:25:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,661 ms / 3,500 ms |
コード長 | 685 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 43,256 KB |
最終ジャッジ日時 | 2024-11-06 13:41:30 |
合計ジャッジ時間 | 15,316 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
n,m = map(int,input().split())max_status = [0]*mcandidate = [0]*mcount = 0top_change = Falsetop_tie = Falsefor 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 = Trueelif status[j]==max_status[j]:candidate[j] += [i+1]top_tie = Trueif top_change:ans = []for j in candidate:ans += jcount = len(set(ans))top_change = Falsetop_tie = Falseelif top_tie:count += 1top_tie = Falseprint(count)