結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー lllllll88938494lllllll88938494
提出日時 2022-05-23 23:40:03
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 306 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,804 KB
実行使用メモリ 842,820 KB
最終ジャッジ日時 2023-10-20 17:47:14
合計ジャッジ時間 2,659 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
60,536 KB
testcase_01 AC 43 ms
61,308 KB
testcase_02 AC 46 ms
63,560 KB
testcase_03 AC 47 ms
62,916 KB
testcase_04 AC 43 ms
60,792 KB
testcase_05 AC 48 ms
67,100 KB
testcase_06 AC 44 ms
61,564 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())
ns=list(map(int,input().split()))
ans={0}
dp=[[0]*((2<<14)+1) for i in range(n+1)]
dp[0][0]=1

for i in range(n):
    for j in range(2<<13):
        if dp[i][j] == 0:
            continue
        dp[i+1][j ^ ns[i]] = 1
        ans.add(j^ns[i])
        dp[i+1][j] = 1
        
print(len(ans))
0