結果

問題 No.709 優勝可能性
ユーザー Mr.FukuMr.Fuku
提出日時 2018-07-15 15:16:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 599 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 10,904 KB
実行使用メモリ 15,440 KB
最終ジャッジ日時 2023-08-06 10:11:03
合計ジャッジ時間 15,731 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,920 KB
testcase_01 AC 17 ms
7,748 KB
testcase_02 AC 16 ms
7,860 KB
testcase_03 AC 16 ms
7,904 KB
testcase_04 AC 16 ms
7,804 KB
testcase_05 AC 16 ms
7,884 KB
testcase_06 AC 17 ms
7,688 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 16 ms
7,820 KB
testcase_09 AC 17 ms
7,880 KB
testcase_10 AC 1,021 ms
8,340 KB
testcase_11 AC 648 ms
8,208 KB
testcase_12 AC 2,348 ms
9,056 KB
testcase_13 AC 1,239 ms
7,772 KB
testcase_14 AC 1,142 ms
8,264 KB
testcase_15 AC 2,174 ms
8,692 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
max_status = [0]*m
candidate = [0]*m
count = 0
calc_flag = True

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]
            calc_flag = True
        elif status[j]==max_status[j]:
            candidate[j] += [i+1]
            calc_flag = True
    
    if calc_flag:
        ans = []
        for j in candidate:
            ans += j
        ans = set(ans)
        count = len(ans)
        calc_flag = False
    print(count)
0