結果

問題 No.709 優勝可能性
ユーザー syunsukesyunsuke
提出日時 2018-07-08 23:30:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 925 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 18,924 KB
最終ジャッジ日時 2023-09-22 08:19:08
合計ジャッジ時間 15,383 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 734 ms
8,116 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

NM=input()
NM=NM.rstrip().split(" ")
N=int(NM[0])
M=int(NM[1])

list1=[]
for i in range(M):
    list1.append([0,[0]])
#print(list1)
for j in range(N):
    line=input()
    line=line.rstrip().split(" ")
    for k in range(M):
        if int(line[k])>list1[k][0]:
            list1[k][0]=int(line[k])
            list1[k][1]=[j+1]
        elif int(line[k])==list1[k][0]:
            list1[k][1].append(j+1)
        else:
            pass
    #print(list1)
    list2=[]
    l=0
    for l in range(M):
            
        l1=[list1[l][1]]
        if len(l1)==1:
            
            if list1[l][1] not in list2:
                list2.append(list1[l][1])
        else:
            m=0
            for m in range(len(list1[l][1])):
                if list1[l][1][m] not in list2:
                    list2.append(list1[l][1][m])
    if M>1:
        print(len(list2))
    else:
        print(len(list2[0]))
                    
0