結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-10 12:15:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 207 bytes
コンパイル時間 660 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 781,164 KB
最終ジャッジ日時 2023-09-08 01:28:55
合計ジャッジ時間 17,898 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
8,688 KB
testcase_01 AC 66 ms
9,140 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 RE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 RE -
testcase_13 AC 26 ms
8,184 KB
testcase_14 TLE -
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