結果

問題 No.1373 Directed Operations
ユーザー 👑 KazunKazun
提出日時 2021-02-05 21:36:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 1,347 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 97,072 KB
最終ジャッジ日時 2023-09-15 07:22:15
合計ジャッジ時間 7,944 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,416 KB
testcase_02 WA -
testcase_03 AC 94 ms
88,848 KB
testcase_04 AC 110 ms
97,072 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 213 ms
96,924 KB
testcase_10 AC 177 ms
90,524 KB
testcase_11 AC 95 ms
77,532 KB
testcase_12 AC 162 ms
88,628 KB
testcase_13 AC 85 ms
76,592 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
N=int(input())
M=map(int,input().split())
A=[]
for i,a in enumerate(M,1):
    A.append((i,a))

A.sort(key=lambda x:x[1])
X=[]
for i,(k,a) in enumerate(A,1):
    if i<a:
        print("NO")
        exit()

    X.append((k,i-a+1))

X.sort(key=lambda x:x[0])
for k,x in X:
    print(x)
0