結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー finefine
提出日時 2016-03-31 22:37:56
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 174 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 11,312 KB
実行使用メモリ 31,040 KB
最終ジャッジ日時 2023-09-17 17:29:49
合計ジャッジ時間 6,217 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,240 KB
testcase_01 AC 87 ms
15,236 KB
testcase_02 AC 82 ms
15,200 KB
testcase_03 AC 82 ms
14,896 KB
testcase_04 AC 80 ms
15,344 KB
testcase_05 AC 84 ms
15,136 KB
testcase_06 AC 82 ms
15,136 KB
testcase_07 AC 81 ms
15,104 KB
testcase_08 AC 123 ms
26,516 KB
testcase_09 AC 89 ms
17,156 KB
testcase_10 AC 116 ms
23,740 KB
testcase_11 AC 108 ms
21,232 KB
testcase_12 AC 126 ms
28,044 KB
testcase_13 AC 140 ms
29,484 KB
testcase_14 AC 113 ms
22,992 KB
testcase_15 AC 145 ms
30,520 KB
testcase_16 AC 128 ms
28,028 KB
testcase_17 AC 134 ms
29,040 KB
testcase_18 AC 80 ms
15,140 KB
testcase_19 AC 82 ms
15,208 KB
testcase_20 AC 125 ms
22,204 KB
testcase_21 AC 147 ms
31,040 KB
testcase_22 AC 148 ms
30,876 KB
testcase_23 AC 81 ms
15,072 KB
testcase_24 AC 81 ms
15,280 KB
testcase_25 AC 83 ms
15,048 KB
testcase_26 AC 84 ms
15,184 KB
testcase_27 AC 81 ms
15,080 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 144 ms
30,448 KB
testcase_34 AC 144 ms
30,452 KB
testcase_35 AC 146 ms
30,728 KB
testcase_36 AC 151 ms
30,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.split.map(&:to_i).uniq
m = a.max.to_s(2).length
count = m
m.times{|i|
    if a.all?{|v|v[i] == 0}
        count -= 1
    end
    }
p 2 ** [count,n].min
0