結果

問題 No.2028 Even Choice
ユーザー tailstails
提出日時 2022-08-05 22:56:56
言語 cLay
(20231016-1)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 127 bytes
コンパイル時間 4,205 ms
コンパイル使用メモリ 160,140 KB
実行使用メモリ 9,076 KB
最終ジャッジ日時 2023-10-14 00:33:17
合計ジャッジ時間 5,313 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
6,704 KB
testcase_01 AC 20 ms
9,008 KB
testcase_02 AC 24 ms
6,464 KB
testcase_03 AC 11 ms
9,036 KB
testcase_04 AC 11 ms
9,076 KB
testcase_05 AC 5 ms
4,388 KB
testcase_06 AC 22 ms
6,340 KB
testcase_07 AC 5 ms
4,892 KB
testcase_08 AC 15 ms
5,472 KB
testcase_09 AC 16 ms
6,212 KB
testcase_10 AC 4 ms
4,712 KB
testcase_11 AC 5 ms
4,352 KB
testcase_12 AC 3 ms
4,348 KB
testcase_13 AC 11 ms
8,736 KB
testcase_14 AC 7 ms
4,364 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 2 ms
4,352 KB
testcase_20 AC 1 ms
4,348 KB
testcase_21 AC 2 ms
4,352 KB
testcase_22 AC 2 ms
4,348 KB
testcase_23 AC 2 ms
4,348 KB
testcase_24 AC 2 ms
4,352 KB
testcase_25 AC 1 ms
4,348 KB
testcase_26 AC 1 ms
4,348 KB
testcase_27 AC 1 ms
4,348 KB
testcase_28 AC 7 ms
5,388 KB
testcase_29 AC 4 ms
4,824 KB
testcase_30 AC 4 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@k,@a[n],z=0,s=0;
Heap<ll>q;
q.walloc(k);
rrep(i,n){
	if(i&1)z>?=s+a[i];
	s+=q.push(a[i]);
	if(i<=n-k)s-=q.pop();
}
wt(z);
0