結果

問題 No.709 優勝可能性
ユーザー mkawa2mkawa2
提出日時 2020-01-30 23:46:19
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 1,117 bytes
コンパイル時間 873 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 140,288 KB
最終ジャッジ日時 2023-10-14 09:04:31
合計ジャッジ時間 7,584 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
75,728 KB
testcase_01 AC 99 ms
71,388 KB
testcase_02 AC 94 ms
71,688 KB
testcase_03 AC 95 ms
71,452 KB
testcase_04 AC 96 ms
71,648 KB
testcase_05 AC 97 ms
71,352 KB
testcase_06 AC 95 ms
71,472 KB
testcase_07 AC 95 ms
71,472 KB
testcase_08 AC 97 ms
71,712 KB
testcase_09 AC 97 ms
71,364 KB
testcase_10 TLE -
testcase_11 AC 364 ms
84,920 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *

int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline()[:-1]
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
dij = [(0, 1), (1, 0), (0, -1), (-1, 0)]

def main():
    n,m=MI()
    mem=[set() for _ in range(m)]
    val=[-1]*m
    for i in range(n):
        rr=LI()
        for j,r in enumerate(rr):
            if r>val[j]:
                val[j]=r
                mem[j].clear()
                mem[j].add(i)
            if r==val[j]:
                mem[j].add(i)
        s=set()
        for ms in mem:s|=ms
        print(len(s))

main()
0