結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,052 KB
testcase_01 AC 81 ms
15,112 KB
testcase_02 AC 80 ms
15,064 KB
testcase_03 WA -
testcase_04 AC 81 ms
15,304 KB
testcase_05 AC 79 ms
15,164 KB
testcase_06 WA -
testcase_07 AC 78 ms
15,108 KB
testcase_08 AC 120 ms
26,404 KB
testcase_09 AC 88 ms
17,000 KB
testcase_10 AC 115 ms
23,492 KB
testcase_11 AC 104 ms
21,164 KB
testcase_12 AC 127 ms
28,068 KB
testcase_13 AC 138 ms
29,416 KB
testcase_14 AC 111 ms
23,140 KB
testcase_15 AC 142 ms
30,524 KB
testcase_16 AC 125 ms
27,900 KB
testcase_17 AC 131 ms
28,792 KB
testcase_18 AC 81 ms
15,248 KB
testcase_19 AC 80 ms
15,040 KB
testcase_20 AC 123 ms
22,200 KB
testcase_21 AC 145 ms
30,876 KB
testcase_22 AC 147 ms
30,932 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 146 ms
30,720 KB
testcase_34 AC 146 ms
30,456 KB
testcase_35 AC 147 ms
30,732 KB
testcase_36 AC 146 ms
30,688 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
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 1 << count
0