結果
| 問題 |
No.1373 Directed Operations
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-05 22:12:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 254 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 25,476 KB |
| 最終ジャッジ日時 | 2024-07-02 12:41:01 |
| 合計ジャッジ時間 | 4,486 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 10 |
ソースコード
from collections import defaultdict
n = int(input())
a = list(map(int, input().split()))
d = defaultdict(int)
ans = []
for i in a:
if d[i] + i >= n:
exit(print("NO"))
ans.append(d[i] + 1)
d[i] += 1
print("YES")
print(*ans, sep="\n")