結果

問題 No.130 XOR Minimax
ユーザー hogeover30hogeover30
提出日時 2017-01-08 15:19:50
言語 Ruby
(3.3.0)
結果
AC  
実行時間 713 ms / 5,000 ms
コード長 126 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 11,328 KB
実行使用メモリ 32,364 KB
最終ジャッジ日時 2023-10-10 00:16:53
合計ジャッジ時間 10,035 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 361 ms
18,208 KB
testcase_01 AC 73 ms
15,152 KB
testcase_02 AC 68 ms
15,272 KB
testcase_03 AC 74 ms
15,276 KB
testcase_04 AC 292 ms
16,436 KB
testcase_05 AC 390 ms
32,364 KB
testcase_06 AC 442 ms
21,360 KB
testcase_07 AC 535 ms
32,172 KB
testcase_08 AC 713 ms
23,504 KB
testcase_09 AC 134 ms
16,204 KB
testcase_10 AC 168 ms
16,812 KB
testcase_11 AC 399 ms
20,148 KB
testcase_12 AC 100 ms
15,912 KB
testcase_13 AC 335 ms
19,356 KB
testcase_14 AC 639 ms
22,108 KB
testcase_15 AC 81 ms
15,420 KB
testcase_16 AC 470 ms
19,500 KB
testcase_17 AC 481 ms
19,628 KB
testcase_18 AC 514 ms
20,132 KB
testcase_19 AC 601 ms
21,448 KB
testcase_20 AC 340 ms
17,828 KB
testcase_21 AC 630 ms
21,704 KB
testcase_22 AC 192 ms
16,348 KB
testcase_23 AC 110 ms
15,416 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,$<.map(&:to_i)]
0