結果
| 問題 | No.1373 Directed Operations |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-05 21:37:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 145 ms / 2,000 ms |
| + 624µs | |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 96,232 KB |
| 実行使用メモリ | 107,264 KB |
| 最終ジャッジ日時 | 2026-08-04 00:45:17 |
| 合計ジャッジ時間 | 4,438 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
ソースコード
n = int(input())
*a, = map(int,input().split())
s = sorted(range(n-1),key = lambda i:a[i])
ans = [0]*(n-1)
for i in range(n-1):
x = i+1-a[s[i]]
if x < 0:
print("NO")
exit()
ans[s[i]] = x+1
print("YES")
print(*ans)
convexineq