結果

問題 No.2686 商品券の使い道
ユーザー tailstails
提出日時 2024-03-21 18:34:59
言語 cLay
(20240104-1)
結果
AC  
実行時間 91 ms / 3,000 ms
コード長 316 bytes
コンパイル時間 2,719 ms
コンパイル使用メモリ 176,068 KB
実行使用メモリ 36,096 KB
最終ジャッジ日時 2024-03-21 18:35:06
合計ジャッジ時間 6,541 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 1 ms
6,676 KB
testcase_02 AC 20 ms
11,520 KB
testcase_03 AC 20 ms
11,520 KB
testcase_04 AC 19 ms
11,520 KB
testcase_05 AC 20 ms
11,520 KB
testcase_06 AC 21 ms
11,520 KB
testcase_07 AC 19 ms
11,520 KB
testcase_08 AC 20 ms
11,520 KB
testcase_09 AC 20 ms
11,520 KB
testcase_10 AC 20 ms
11,520 KB
testcase_11 AC 21 ms
11,520 KB
testcase_12 AC 20 ms
11,520 KB
testcase_13 AC 20 ms
11,520 KB
testcase_14 AC 21 ms
11,520 KB
testcase_15 AC 21 ms
11,520 KB
testcase_16 AC 21 ms
11,520 KB
testcase_17 AC 21 ms
11,520 KB
testcase_18 AC 21 ms
11,520 KB
testcase_19 AC 20 ms
11,520 KB
testcase_20 AC 20 ms
11,520 KB
testcase_21 AC 20 ms
11,520 KB
testcase_22 AC 20 ms
11,520 KB
testcase_23 AC 20 ms
11,520 KB
testcase_24 AC 20 ms
11,520 KB
testcase_25 AC 20 ms
11,520 KB
testcase_26 AC 21 ms
11,520 KB
testcase_27 AC 20 ms
11,520 KB
testcase_28 AC 20 ms
11,520 KB
testcase_29 AC 82 ms
36,096 KB
testcase_30 AC 88 ms
36,096 KB
testcase_31 AC 84 ms
36,096 KB
testcase_32 AC 84 ms
36,096 KB
testcase_33 AC 84 ms
36,096 KB
testcase_34 AC 82 ms
36,096 KB
testcase_35 AC 85 ms
36,096 KB
testcase_36 AC 85 ms
36,096 KB
testcase_37 AC 86 ms
36,096 KB
testcase_38 AC 84 ms
36,096 KB
testcase_39 AC 85 ms
36,096 KB
testcase_40 AC 90 ms
36,096 KB
testcase_41 AC 84 ms
36,096 KB
testcase_42 AC 91 ms
36,096 KB
testcase_43 AC 87 ms
36,096 KB
testcase_44 AC 91 ms
36,096 KB
testcase_45 AC 84 ms
36,096 KB
testcase_46 AC 87 ms
36,096 KB
evil_random20_1.txt AC 82 ms
36,096 KB
evil_random20_2.txt AC 82 ms
36,096 KB
evil_random20_3.txt AC 83 ms
36,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@m,@q,@(a,b)[n],za[1<<n]{},zb[]{},zm[]{},zq[]{};

rep(i,n){
	za[1<<i]=a[i];
	zb[1<<i]=b[i];
}

ZetaTransform(1<<n,za);
ZetaTransform(1<<n,zb);

rep(i,1<<n){
	zm[i]=za[i]<=m?zb[i]:0;
	zq[i]=za[i]<=q?zb[i]:0;
}

ZetaTransform_max(1<<n,zm);
ZetaTransform_max(1<<n,zq);

wt(max[ll][i,0,1<<n](zm[i]+zq[(1<<n)+~i]));
0