結果

問題 No.709 優勝可能性
ユーザー mkawa2mkawa2
提出日時 2020-01-30 23:44:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 1,117 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 10,976 KB
実行使用メモリ 13,764 KB
最終ジャッジ日時 2023-10-14 09:04:18
合計ジャッジ時間 7,666 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,528 KB
testcase_01 AC 17 ms
8,684 KB
testcase_02 AC 18 ms
8,660 KB
testcase_03 AC 17 ms
8,500 KB
testcase_04 AC 17 ms
8,684 KB
testcase_05 AC 18 ms
8,676 KB
testcase_06 AC 18 ms
8,688 KB
testcase_07 AC 19 ms
8,648 KB
testcase_08 AC 17 ms
8,660 KB
testcase_09 AC 18 ms
8,572 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 #

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