結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-10 12:20:49
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 207 bytes
コンパイル時間 908 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 846,864 KB
最終ジャッジ日時 2023-09-08 01:34:31
合計ジャッジ時間 7,802 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,732 KB
testcase_01 AC 75 ms
77,308 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 MLE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 RE -
testcase_13 AC 77 ms
76,468 KB
testcase_14 MLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
dp=[[0]*20000 for _ in range(n+1)]
dp[0][0]=1
for i in range(n):
    for j in range(20000):
        dp[i+1][j^a[i]]=dp[i][j] or dp[i][j^a[i]]
print(sum(dp[n]))
0