結果

問題 No.649 ここでちょっとQK!
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-01-30 20:26:26
言語 cLay
(20240104-1)
結果
AC  
実行時間 141 ms / 3,000 ms
コード長 207 bytes
コンパイル時間 2,308 ms
コンパイル使用メモリ 163,424 KB
実行使用メモリ 13,716 KB
最終ジャッジ日時 2023-09-19 00:21:07
合計ジャッジ時間 5,724 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 4 ms
4,384 KB
testcase_04 AC 88 ms
13,716 KB
testcase_05 AC 86 ms
13,716 KB
testcase_06 AC 84 ms
13,700 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 47 ms
8,260 KB
testcase_13 AC 49 ms
8,328 KB
testcase_14 AC 47 ms
8,248 KB
testcase_15 AC 51 ms
8,308 KB
testcase_16 AC 51 ms
8,540 KB
testcase_17 AC 57 ms
8,916 KB
testcase_18 AC 64 ms
9,268 KB
testcase_19 AC 77 ms
9,620 KB
testcase_20 AC 83 ms
10,268 KB
testcase_21 AC 91 ms
10,480 KB
testcase_22 AC 100 ms
10,844 KB
testcase_23 AC 106 ms
11,192 KB
testcase_24 AC 114 ms
11,624 KB
testcase_25 AC 129 ms
11,992 KB
testcase_26 AC 141 ms
12,456 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 44 ms
7,824 KB
testcase_31 AC 49 ms
8,084 KB
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 1 ms
4,380 KB
testcase_34 AC 1 ms
4,380 KB
testcase_35 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll Q,K,V;multiset<ll>a;multiset<ll>b;
{rd(Q,K);rep(Q){rd(V);if(V<2){rd(V);a.insert(-V);auto i=a.begin();a.size()<K||(b.insert(-*i),a.erase(i),0);}else{auto i=b.begin();wt(b.size()?(V=*i,b.erase(i),V):-1);}}}
0