結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー DrDrpilotDrDrpilot
提出日時 2022-03-15 18:24:40
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 236 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 81,820 KB
実行使用メモリ 843,784 KB
最終ジャッジ日時 2023-10-23 16:13:16
合計ジャッジ時間 14,400 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
60,108 KB
testcase_01 AC 42 ms
60,576 KB
testcase_02 AC 44 ms
61,868 KB
testcase_03 AC 45 ms
61,556 KB
testcase_04 AC 42 ms
60,264 KB
testcase_05 AC 46 ms
62,028 KB
testcase_06 AC 42 ms
60,732 KB
testcase_07 MLE -
testcase_08 MLE -
testcase_09 MLE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 RE -
testcase_13 AC 40 ms
59,792 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 AC 50 ms
61,560 KB
testcase_17 AC 462 ms
235,052 KB
testcase_18 MLE -
testcase_19 AC 243 ms
146,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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