結果

問題 No.709 優勝可能性
コンテスト
ユーザー zxc1113
提出日時 2018-07-06 02:41:17
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 528 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 666 ms
コンパイル使用メモリ 20,604 KB
実行使用メモリ 65,624 KB
最終ジャッジ日時 2026-03-21 19:33:35
合計ジャッジ時間 10,072 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 1 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n, m = list(map(int, input().split()))
people = []
for i in range(n):
    people.append(list(map(int,input().split())))
max_point = [0]*m
members = [set([]) for i in range(m)]
for i in range(n):
    for ind, j in enumerate(people[i]):
        if max_point[ind] < j:
            max_point[ind] = j
            members[ind] = set([j])
        elif max_point[ind] == j:
            members[ind].add(j)
        else:
            pass
    ans_set = set([])
    for j in members:
        ans_set = ans_set | j
    print(len(ans_set))
0