結果
問題 | No.709 優勝可能性 |
ユーザー |
![]() |
提出日時 | 2018-07-08 23:30:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 925 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 24,448 KB |
最終ジャッジ日時 | 2024-07-08 00:39:36 |
合計ジャッジ時間 | 15,916 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 1 WA * 15 TLE * 1 -- * 5 |
ソースコード
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]))