結果

問題 No.1373 Directed Operations
ユーザー NoaSaberNoaSaber
提出日時 2021-03-07 17:20:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 102,400 KB
最終ジャッジ日時 2024-04-17 08:26:19
合計ジャッジ時間 7,320 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 40 ms
51,584 KB
testcase_02 WA -
testcase_03 AC 79 ms
90,880 KB
testcase_04 AC 82 ms
93,440 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 181 ms
98,304 KB
testcase_10 AC 160 ms
95,488 KB
testcase_11 AC 73 ms
68,992 KB
testcase_12 AC 141 ms
89,600 KB
testcase_13 AC 57 ms
62,976 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0