結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー horiesiniti
提出日時 2017-10-22 14:18:55
言語 Ruby
(3.4.1)
結果
TLE  
実行時間 -
コード長 210 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 24,448 KB
最終ジャッジ日時 2024-11-21 13:47:04
合計ジャッジ時間 53,849 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 1 TLE * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets.to_i
as=gets.split.map{|e| e.to_i}
dp=[]
(0..16384).each{
	dp.push(0)	
}
dp[0]=1
as.each{|a|
	(0..16384).each{|e|
		if dp[e]!=0 then
			dp[a^e]=1
		end
	}
}
ans=0
(0..16384).each{|e|
	ans+=dp[e]
}
puts ans
0