結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー tookunn_1213
提出日時 2017-01-04 21:44:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 221 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 62,720 KB
最終ジャッジ日時 2024-12-16 08:49:14
合計ジャッジ時間 10,830 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[int(i) for i in input().split()]
dp = [[0]*((1<<14)+1)]*(N+1)
dp[0][0]=1
for i in range(N):
	for j in range((1<<14)+1):
		if dp[i][j]:
			dp[i+1][(j^A[i])%((1<<14)+1)]=1
			dp[i+1][j]=1
print(sum(dp[N]))
0