結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー tookunn_1213tookunn_1213
提出日時 2017-01-04 21:46:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,010 ms / 5,000 ms
コード長 213 bytes
コンパイル時間 1,081 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 77,092 KB
最終ジャッジ日時 2023-09-12 09:31:34
合計ジャッジ時間 14,017 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,008 KB
testcase_01 AC 78 ms
76,128 KB
testcase_02 AC 79 ms
76,460 KB
testcase_03 AC 77 ms
76,332 KB
testcase_04 AC 77 ms
76,232 KB
testcase_05 AC 80 ms
76,492 KB
testcase_06 AC 77 ms
76,096 KB
testcase_07 AC 2,010 ms
77,004 KB
testcase_08 AC 1,398 ms
77,008 KB
testcase_09 AC 983 ms
76,968 KB
testcase_10 AC 1,171 ms
76,976 KB
testcase_11 AC 1,510 ms
76,992 KB
testcase_12 AC 80 ms
76,648 KB
testcase_13 AC 75 ms
76,120 KB
testcase_14 AC 759 ms
77,092 KB
testcase_15 AC 1,560 ms
76,996 KB
testcase_16 AC 79 ms
76,552 KB
testcase_17 AC 406 ms
77,012 KB
testcase_18 AC 1,711 ms
76,996 KB
testcase_19 AC 234 ms
76,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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