結果

問題 No.649 ここでちょっとQK!
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-01-30 17:12:28
言語 cLay
(20240104-1)
結果
AC  
実行時間 123 ms / 3,000 ms
コード長 213 bytes
コンパイル時間 2,318 ms
コンパイル使用メモリ 163,300 KB
実行使用メモリ 13,776 KB
最終ジャッジ日時 2023-09-19 00:20:32
合計ジャッジ時間 6,796 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 4 ms
4,456 KB
testcase_04 AC 84 ms
13,748 KB
testcase_05 AC 83 ms
13,776 KB
testcase_06 AC 80 ms
13,776 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 44 ms
8,296 KB
testcase_13 AC 45 ms
8,328 KB
testcase_14 AC 43 ms
8,500 KB
testcase_15 AC 47 ms
8,336 KB
testcase_16 AC 43 ms
8,844 KB
testcase_17 AC 52 ms
8,940 KB
testcase_18 AC 60 ms
9,340 KB
testcase_19 AC 66 ms
9,668 KB
testcase_20 AC 79 ms
10,032 KB
testcase_21 AC 86 ms
10,412 KB
testcase_22 AC 90 ms
10,864 KB
testcase_23 AC 94 ms
11,188 KB
testcase_24 AC 107 ms
11,616 KB
testcase_25 AC 112 ms
11,988 KB
testcase_26 AC 123 ms
12,556 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,384 KB
testcase_29 AC 1 ms
4,384 KB
testcase_30 AC 41 ms
7,908 KB
testcase_31 AC 43 ms
8,392 KB
testcase_32 AC 1 ms
4,380 KB
testcase_33 AC 2 ms
4,380 KB
testcase_34 AC 2 ms
4,388 KB
testcase_35 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll Q,K,V;multiset<ll> a;multiset<ll> b;
{rd(Q,K);for(;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