結果
| 問題 |
No.1032 数数え
|
| ユーザー |
|
| 提出日時 | 2021-02-05 10:55:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 384 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 82,160 KB |
| 実行使用メモリ | 108,184 KB |
| 最終ジャッジ日時 | 2024-07-02 00:29:03 |
| 合計ジャッジ時間 | 2,053 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 2 |
ソースコード
N,M=map(int,input().split())
L=sorted(list(map(int,input().split())))
num=1
m=L[0]
ans=[0]*(m-1)
for i in range(1,N):
if L[i]==m:
num+=1
if i==N-1:
ans.append(num)
else:
ans.append(num)
ans+=[0]*(L[i]-m-1)
num=1
m=L[i]
for i in range(M):
if len(ans)-1>=i:
print(i+1,ans[i])
else:
print(i+1,0)