結果

問題 No.709 優勝可能性
ユーザー togetogehattogetogehat
提出日時 2018-07-21 10:15:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 900 ms / 3,500 ms
コード長 479 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 60,052 KB
最終ジャッジ日時 2023-08-27 00:26:02
合計ジャッジ時間 11,008 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,876 KB
testcase_01 AC 16 ms
7,876 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 AC 16 ms
7,784 KB
testcase_04 AC 17 ms
7,840 KB
testcase_05 AC 16 ms
7,896 KB
testcase_06 AC 15 ms
7,792 KB
testcase_07 AC 15 ms
7,808 KB
testcase_08 AC 15 ms
7,812 KB
testcase_09 AC 16 ms
7,868 KB
testcase_10 AC 483 ms
31,828 KB
testcase_11 AC 372 ms
22,448 KB
testcase_12 AC 690 ms
44,792 KB
testcase_13 AC 900 ms
56,720 KB
testcase_14 AC 826 ms
41,204 KB
testcase_15 AC 789 ms
29,004 KB
testcase_16 AC 835 ms
30,304 KB
testcase_17 AC 894 ms
36,716 KB
testcase_18 AC 16 ms
7,800 KB
testcase_19 AC 15 ms
7,896 KB
testcase_20 AC 842 ms
60,052 KB
testcase_21 AC 820 ms
60,048 KB
testcase_22 AC 15 ms
7,804 KB
testcase_23 AC 15 ms
7,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
x=[0]*m
c=[0]*n
s=[[]]*m
r=0
rs=[list(map(int,input().split())) for _ in range(n)]
for i in range(n):
    b=0
    for j,v in enumerate(rs[i]):
        if x[j]==v:
            c[i]+=1
            s[j].append(i)
            b=1
        elif x[j]<v:
            x[j]=v
            c[i]+=1
            for k in s[j]:
                c[k]-=1
                if not c[k]:
                    r-=1
            s[j]=[i]
            b=1
    r+=b
    print(r)
0