結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー tnoda_tnoda_
提出日時 2015-08-18 18:41:09
言語 PyPy2
(7.3.13)
結果
AC  
実行時間 1,474 ms / 5,000 ms
コード長 203 bytes
コンパイル時間 1,523 ms
コンパイル使用メモリ 77,968 KB
実行使用メモリ 79,764 KB
最終ジャッジ日時 2023-09-11 12:07:31
合計ジャッジ時間 11,837 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
77,864 KB
testcase_01 AC 76 ms
77,360 KB
testcase_02 AC 82 ms
78,800 KB
testcase_03 AC 79 ms
78,872 KB
testcase_04 AC 76 ms
77,332 KB
testcase_05 AC 81 ms
78,876 KB
testcase_06 AC 80 ms
78,740 KB
testcase_07 AC 1,474 ms
79,572 KB
testcase_08 AC 969 ms
79,552 KB
testcase_09 AC 688 ms
79,264 KB
testcase_10 AC 820 ms
79,084 KB
testcase_11 AC 1,051 ms
79,392 KB
testcase_12 AC 82 ms
78,596 KB
testcase_13 AC 74 ms
77,580 KB
testcase_14 AC 395 ms
79,552 KB
testcase_15 AC 1,076 ms
79,764 KB
testcase_16 AC 82 ms
78,868 KB
testcase_17 AC 306 ms
79,392 KB
testcase_18 AC 1,231 ms
79,552 KB
testcase_19 AC 201 ms
79,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
A = map(int, raw_input().strip().split())

dp = [False] * (1 << 15)
dp[0] = True
for a in A:
    for i in xrange(len(dp)):
        if dp[i]:
            dp[a ^ i] = True
print(dp.count(True))
0