結果
問題 | No.709 優勝可能性 |
ユーザー | mitsuo |
提出日時 | 2018-08-22 13:39:56 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 713 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 11,004 KB |
実行使用メモリ | 27,992 KB |
最終ジャッジ日時 | 2023-08-25 12:47:30 |
合計ジャッジ時間 | 7,583 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
27,992 KB |
testcase_01 | AC | 15 ms
7,964 KB |
testcase_02 | AC | 15 ms
7,944 KB |
testcase_03 | AC | 17 ms
7,924 KB |
testcase_04 | AC | 17 ms
7,804 KB |
testcase_05 | AC | 15 ms
7,788 KB |
testcase_06 | AC | 16 ms
7,844 KB |
testcase_07 | AC | 16 ms
7,852 KB |
testcase_08 | AC | 15 ms
7,816 KB |
testcase_09 | AC | 15 ms
7,852 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
ソースコード
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)]