結果
問題 | No.1373 Directed Operations |
ユーザー |
👑 ![]() |
提出日時 | 2021-02-05 21:37:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 291 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 94,436 KB |
最終ジャッジ日時 | 2024-07-02 11:48:57 |
合計ジャッジ時間 | 4,328 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
import sysinput=sys.stdin.readlineN=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))print("YES")X.sort(key=lambda x:x[0])for k,x in X:print(x)