結果
| 問題 |
No.709 優勝可能性
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-02-12 01:13:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 167 ms / 3,500 ms |
| コード長 | 703 bytes |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 82,224 KB |
| 実行使用メモリ | 104,184 KB |
| 最終ジャッジ日時 | 2024-07-18 11:51:02 |
| 合計ジャッジ時間 | 3,571 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
import sys
input=sys.stdin.readline
write=sys.stdout.write
N,M=map(int,input().split())
Count =[0]*(M+1)
Chance=[0]*N
Max =[-1]*M
Person=[[] for _ in range(M)]
X=[0]*N
for k in range(N):
R=list(map(int,input().split()))
Count[0]+=1
for j in range(M):
if R[j]>=Max[j]:
Count[Chance[k]]-=1
Chance[k]+=1
Count[Chance[k]]+=1
if R[j]==Max[j]:
Person[j].append(k)
elif R[j]>Max[j]:
for t in Person[j]:
Count[Chance[t]]-=1
Chance[t]-=1
Count[Chance[t]]+=1
Max[j]=R[j]
Person[j]=[k]
X[k]=k+1-Count[0]
write("\n".join(map(str,X)))
Kazun