結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー fmhrfmhr
提出日時 2015-04-17 14:29:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 257 ms / 5,000 ms
コード長 288 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 86,676 KB
実行使用メモリ 94,244 KB
最終ジャッジ日時 2023-09-17 16:33:54
合計ジャッジ時間 7,970 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,468 KB
testcase_01 AC 77 ms
71,260 KB
testcase_02 AC 79 ms
71,508 KB
testcase_03 AC 74 ms
71,216 KB
testcase_04 AC 77 ms
71,196 KB
testcase_05 AC 78 ms
71,208 KB
testcase_06 AC 76 ms
71,140 KB
testcase_07 AC 75 ms
71,140 KB
testcase_08 AC 211 ms
88,624 KB
testcase_09 AC 110 ms
77,032 KB
testcase_10 AC 177 ms
85,180 KB
testcase_11 AC 155 ms
81,800 KB
testcase_12 AC 226 ms
91,912 KB
testcase_13 AC 235 ms
92,028 KB
testcase_14 AC 171 ms
84,960 KB
testcase_15 AC 247 ms
93,984 KB
testcase_16 AC 220 ms
90,324 KB
testcase_17 AC 234 ms
91,876 KB
testcase_18 AC 80 ms
76,132 KB
testcase_19 AC 74 ms
71,472 KB
testcase_20 AC 94 ms
89,252 KB
testcase_21 AC 256 ms
93,472 KB
testcase_22 AC 255 ms
93,624 KB
testcase_23 AC 79 ms
75,648 KB
testcase_24 AC 79 ms
75,780 KB
testcase_25 AC 79 ms
75,516 KB
testcase_26 AC 76 ms
71,080 KB
testcase_27 AC 77 ms
75,508 KB
testcase_28 AC 186 ms
86,408 KB
testcase_29 AC 228 ms
91,532 KB
testcase_30 AC 215 ms
90,232 KB
testcase_31 AC 195 ms
88,152 KB
testcase_32 AC 218 ms
90,268 KB
testcase_33 AC 253 ms
94,244 KB
testcase_34 AC 252 ms
93,612 KB
testcase_35 AC 254 ms
93,504 KB
testcase_36 AC 257 ms
93,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

ret = 0
for i in range(n):
    if a[i]:
        ret += 1
        x = 0
        while (2**(x+1)) <= a[i]:
            x += 1
        for y in range(i+1, n, 1):
            if a[y] & (2 ** x):
                a[y] ^= a[i]

print(2**ret)
0