結果

問題 No.709 優勝可能性
ユーザー GrayCoderGrayCoder
提出日時 2018-07-25 21:34:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 590 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 29,872 KB
最終ジャッジ日時 2023-09-09 10:16:01
合計ジャッジ時間 7,233 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,548 KB
testcase_01 AC 15 ms
8,160 KB
testcase_02 AC 15 ms
8,128 KB
testcase_03 AC 14 ms
8,108 KB
testcase_04 AC 14 ms
8,116 KB
testcase_05 AC 16 ms
8,132 KB
testcase_06 AC 16 ms
8,160 KB
testcase_07 AC 16 ms
8,244 KB
testcase_08 AC 16 ms
8,132 KB
testcase_09 AC 14 ms
8,096 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 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import chain
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write

def main():
    N, M = map(int, input().split())
    R = [tuple(map(int, input().split())) for _ in [0] * N]

    winner = [[] for _ in [0] * M]
    point = [0] * M
    for i, n in enumerate(R):
        for j in range(M):
            if n[j] > point[j]:
                point[j] = n[j]
                winner[j] = [i]
            elif n[j] == point[j]:
                winner[j].append(i)
        ans = len(set(chain.from_iterable(winner)))
        print(ans)

main()
0