結果

問題 No.130 XOR Minimax
ユーザー syarosyaro
提出日時 2016-02-22 22:19:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 673 ms / 5,000 ms
コード長 129 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 11,280 KB
実行使用メモリ 43,592 KB
最終ジャッジ日時 2023-10-10 00:13:53
合計ジャッジ時間 9,882 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 380 ms
21,084 KB
testcase_01 AC 74 ms
15,040 KB
testcase_02 AC 74 ms
15,068 KB
testcase_03 AC 70 ms
15,104 KB
testcase_04 AC 282 ms
21,180 KB
testcase_05 AC 407 ms
38,508 KB
testcase_06 AC 431 ms
31,628 KB
testcase_07 AC 537 ms
43,592 KB
testcase_08 AC 673 ms
29,308 KB
testcase_09 AC 130 ms
17,028 KB
testcase_10 AC 166 ms
17,992 KB
testcase_11 AC 407 ms
28,824 KB
testcase_12 AC 99 ms
15,852 KB
testcase_13 AC 331 ms
27,180 KB
testcase_14 AC 630 ms
23,280 KB
testcase_15 AC 74 ms
15,308 KB
testcase_16 AC 464 ms
23,016 KB
testcase_17 AC 485 ms
23,312 KB
testcase_18 AC 503 ms
23,848 KB
testcase_19 AC 604 ms
22,652 KB
testcase_20 AC 342 ms
20,488 KB
testcase_21 AC 666 ms
23,020 KB
testcase_22 AC 185 ms
16,592 KB
testcase_23 AC 107 ms
15,620 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,b]].min: f[d-1,v]}
gets
p f[30,gets.split.map(&:to_i)]
0