結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー finefine
提出日時 2016-01-17 18:51:17
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 260 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 11,892 KB
実行使用メモリ 104,560 KB
最終ジャッジ日時 2023-10-20 00:30:21
合計ジャッジ時間 7,702 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
16,120 KB
testcase_01 AC 84 ms
16,112 KB
testcase_02 AC 85 ms
16,684 KB
testcase_03 AC 84 ms
16,372 KB
testcase_04 AC 84 ms
16,112 KB
testcase_05 AC 93 ms
17,428 KB
testcase_06 AC 83 ms
16,112 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.split.map(&:to_i).uniq.sort
complete = [0]
a.each{|target|
    if complete & a == a
        break
    end
    tmp = Array.new(complete)
    tmp.each{|m|
        complete.push(m ^ target)
        }
    complete.uniq!
    }
p complete.size
0