結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー wotsushiwotsushi
提出日時 2016-12-24 13:50:56
言語 Ruby
(3.3.0)
結果
MLE  
実行時間 -
コード長 181 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 11,544 KB
実行使用メモリ 813,564 KB
最終ジャッジ日時 2023-08-21 07:53:01
合計ジャッジ時間 7,594 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
20,864 KB
testcase_01 AC 155 ms
25,352 KB
testcase_02 AC 220 ms
36,396 KB
testcase_03 AC 203 ms
33,540 KB
testcase_04 AC 132 ms
22,304 KB
testcase_05 AC 231 ms
38,188 KB
testcase_06 AC 169 ms
26,908 KB
testcase_07 MLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
A = gets.split().map(&:to_i)
dp = Array.new(2**15, false)
dp[0] = true
A.product([*0..(2**15)]).each do |a, i|
  dp[i ^ a] ||= dp[i]
end
ans = dp.count(true)
puts ans
0