結果
| 問題 | No.1373 Directed Operations |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-07 17:20:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 277 bytes |
| 記録 | |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 82,408 KB |
| 実行使用メモリ | 102,636 KB |
| 最終ジャッジ日時 | 2024-10-08 23:27:06 |
| 合計ジャッジ時間 | 7,255 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 12 |
ソースコード
N=int(input())
a=list(map(int,input().split()))
a=[(i+1,j) for i,j in enumerate(a)]
a.sort(key=lambda x:x[1])
ans=[]
for j,i in enumerate(a):
if i[1]>j+1:
print("NO")
exit()
else:
ans.append((i[0],j+2-i[1]))
ans.sort()
for i,j in ans:
print(j)