結果
| 問題 |
No.3298 K-th Slime
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-05 13:48:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 421 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 82,032 KB |
| 実行使用メモリ | 67,652 KB |
| 最終ジャッジ日時 | 2025-10-05 13:48:25 |
| 合計ジャッジ時間 | 3,106 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 25 |
ソースコード
from sortedcontainers import SortedList
n, k, q = map(int, input().split())
a = list(map(int, input().split()))
slimes = SortedList(a)
for _ in range(q):
ty, *arg = map(int, input().split())
if ty == 1:
x = arg[0]
slimes.add(x)
elif ty == 2:
y = arg[0]
slime = slimes[k - 1]
slimes.remove(slime)
slimes.add(slime + y)
else:
print(slimes[k - 1])