結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ysys
提出日時 2018-08-19 08:36:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 707 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 77,228 KB
最終ジャッジ日時 2023-09-13 19:12:50
合計ジャッジ時間 7,467 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
76,244 KB
testcase_01 AC 79 ms
76,284 KB
testcase_02 AC 85 ms
76,488 KB
testcase_03 AC 79 ms
76,600 KB
testcase_04 AC 81 ms
76,476 KB
testcase_05 AC 82 ms
76,540 KB
testcase_06 AC 81 ms
76,472 KB
testcase_07 AC 632 ms
77,032 KB
testcase_08 AC 636 ms
77,040 KB
testcase_09 AC 459 ms
76,816 KB
testcase_10 AC 537 ms
77,228 KB
testcase_11 AC 680 ms
77,112 KB
testcase_12 AC 81 ms
76,480 KB
testcase_13 AC 78 ms
76,596 KB
testcase_14 AC 707 ms
76,972 KB
testcase_15 AC 703 ms
76,820 KB
testcase_16 AC 80 ms
76,388 KB
testcase_17 AC 217 ms
77,176 KB
testcase_18 AC 617 ms
77,180 KB
testcase_19 AC 146 ms
77,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
dp = [0] * (1 << 15)
dp[0] = 1
for i in range(n):
    for j in range(1 << 15):
        dp[a[i] ^ j] |= dp[j]

num = 0
for j in range(1 << 15):
    if dp[j] == 1:
        num += 1

print(num)
0