結果

問題 No.183 たのしい排他的論理和(EASY)
コンテスト
ユーザー asumo0729
提出日時 2020-12-19 18:51:16
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
MLE  
実行時間 -
コード長 542 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 279 ms
コンパイル使用メモリ 85,120 KB
実行使用メモリ 721,920 KB
最終ジャッジ日時 2026-04-09 16:56:06
合計ジャッジ時間 11,034 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 RE * 1 MLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
stdin=sys.stdin

ip=lambda: int(sp())
fp=lambda: float(sp())
lp=lambda:list(map(int,stdin.readline().split()))
tp=lambda:tuple(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()
yp=lambda:print('Yes')
np=lambda:print('No')

n=ip()
a=lp()
dp=[[-1 for _ in range(2**14+1)]for _ in range(n+1)]

dp[0][0]=0
for i in range(n):
    for j in range(2**14+1):
        if dp[i][j]!=-1:
            dp[i+1][j]=1
            dp[i+1][j^a[i]]=1

ans=0
for u in range(2**14+1):
    if dp[-1][u]!=-1:
        ans+=1

print(ans)
0