結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー gorugo30gorugo30
提出日時 2021-03-16 23:23:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 262 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 22,528 KB
最終ジャッジ日時 2024-04-26 06:21:13
合計ジャッジ時間 7,442 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
22,528 KB
testcase_01 AC 73 ms
11,008 KB
testcase_02 AC 131 ms
11,008 KB
testcase_03 AC 117 ms
11,008 KB
testcase_04 AC 57 ms
11,008 KB
testcase_05 AC 142 ms
11,008 KB
testcase_06 AC 83 ms
11,008 KB
testcase_07 TLE -
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())
dp = [False] * (2 ** 15)
A = list(map(int, input().split()))
dp[0] = True
dp[A[0]] = True
for i in range(1, N):
    for j in range(2 ** 15):
        dp[j ^ A[i]] |= dp[j]
ans = 0
for i in range(2 ** 15):
    if dp[i]:
        ans += 1
print(ans)
0