結果
| 問題 |
No.649 ここでちょっとQK!
|
| コンテスト | |
| ユーザー |
kutsutama
|
| 提出日時 | 2018-02-23 15:06:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-08 03:44:31 |
| 合計ジャッジ時間 | 4,054 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 3 |
| other | AC * 1 RE * 31 |
ソースコード
q, k = [int(x) for x in input().split()]
s = []
issorted = False
for i in range(q):
query = [int(x) for x in input().split()]
if len(query) == 2:
s += query[1]
issorted = False
else:
if not issorted:
s.sort()
issorted = True
if len(s) >= k:
p = s.pop(k - 1)
else:
p = -1
print(p)
kutsutama