結果

問題 No.130 XOR Minimax
ユーザー syarosyaro
提出日時 2016-02-22 22:07:08
言語 Ruby
(3.3.0)
結果
AC  
実行時間 671 ms / 5,000 ms
コード長 130 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 11,252 KB
実行使用メモリ 43,688 KB
最終ジャッジ日時 2023-10-10 00:14:26
合計ジャッジ時間 9,765 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 357 ms
21,064 KB
testcase_01 AC 69 ms
15,304 KB
testcase_02 AC 71 ms
15,104 KB
testcase_03 AC 70 ms
15,040 KB
testcase_04 AC 277 ms
21,248 KB
testcase_05 AC 386 ms
38,496 KB
testcase_06 AC 434 ms
31,596 KB
testcase_07 AC 531 ms
43,688 KB
testcase_08 AC 671 ms
29,348 KB
testcase_09 AC 137 ms
16,748 KB
testcase_10 AC 170 ms
18,056 KB
testcase_11 AC 389 ms
29,012 KB
testcase_12 AC 100 ms
15,908 KB
testcase_13 AC 327 ms
27,400 KB
testcase_14 AC 624 ms
23,276 KB
testcase_15 AC 76 ms
15,268 KB
testcase_16 AC 463 ms
23,276 KB
testcase_17 AC 470 ms
23,208 KB
testcase_18 AC 497 ms
23,788 KB
testcase_19 AC 605 ms
22,632 KB
testcase_20 AC 328 ms
20,612 KB
testcase_21 AC 633 ms
23,028 KB
testcase_22 AC 194 ms
16,612 KB
testcase_23 AC 106 ms
15,716 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

f=->(d,v){d<0?0:(a=v.select{|x|x[d]>0})[0]&&(b=v-a)[0]?2**d+[f[d-1,a],f[d-1,b]].min: f[d-1,v]}
gets
p f[30,gets.split.map(&:to_i)]
0