結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー あかりきあかりき
提出日時 2021-03-01 19:08:05
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 273 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 848,484 KB
最終ジャッジ日時 2024-04-14 03:47:11
合計ジャッジ時間 2,804 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
61,540 KB
testcase_01 AC 47 ms
60,288 KB
testcase_02 AC 53 ms
63,928 KB
testcase_03 AC 52 ms
63,612 KB
testcase_04 AC 47 ms
61,164 KB
testcase_05 AC 54 ms
64,120 KB
testcase_06 AC 49 ms
61,556 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 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
dp=[[0]*(2**15) for i in range(n+1)]
dp[0][0]=1
for i in range(n):
  for j in range(2**15-1):
    if dp[i][j]==1:
      dp[i+1][j^a[i]]=1
      dp[i+1][j]=1
ans=0
for i in range(2**15):
  if dp[n][i]==1:
    ans+=1
print(ans)
0