結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 4 ms
4,384 KB
testcase_04 AC 82 ms
13,688 KB
testcase_05 AC 81 ms
13,864 KB
testcase_06 AC 78 ms
13,864 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,384 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 1 ms
4,384 KB
testcase_12 AC 42 ms
8,432 KB
testcase_13 AC 41 ms
8,420 KB
testcase_14 AC 41 ms
8,220 KB
testcase_15 AC 46 ms
8,408 KB
testcase_16 AC 41 ms
8,588 KB
testcase_17 AC 48 ms
9,012 KB
testcase_18 AC 54 ms
9,376 KB
testcase_19 AC 58 ms
9,692 KB
testcase_20 AC 64 ms
10,032 KB
testcase_21 AC 71 ms
10,420 KB
testcase_22 AC 74 ms
10,832 KB
testcase_23 AC 82 ms
11,300 KB
testcase_24 AC 90 ms
11,840 KB
testcase_25 AC 96 ms
12,280 KB
testcase_26 AC 100 ms
12,624 KB
testcase_27 AC 1 ms
4,384 KB
testcase_28 AC 1 ms
4,380 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 38 ms
7,800 KB
testcase_31 AC 39 ms
8,328 KB
testcase_32 AC 1 ms
4,380 KB
testcase_33 AC 1 ms
4,384 KB
testcase_34 AC 1 ms
4,388 KB
testcase_35 AC 1 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