結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー rlangevinrlangevin
提出日時 2023-01-07 18:31:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 171 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 94,260 KB
最終ジャッジ日時 2023-08-21 08:38:18
合計ジャッジ時間 7,714 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,404 KB
testcase_01 AC 72 ms
71,504 KB
testcase_02 AC 74 ms
71,536 KB
testcase_03 AC 75 ms
71,312 KB
testcase_04 AC 74 ms
71,184 KB
testcase_05 AC 72 ms
71,184 KB
testcase_06 AC 74 ms
71,272 KB
testcase_07 AC 74 ms
71,464 KB
testcase_08 AC 144 ms
88,084 KB
testcase_09 AC 92 ms
76,956 KB
testcase_10 AC 129 ms
85,120 KB
testcase_11 AC 115 ms
81,356 KB
testcase_12 AC 156 ms
91,260 KB
testcase_13 AC 159 ms
92,068 KB
testcase_14 AC 125 ms
84,392 KB
testcase_15 AC 167 ms
93,788 KB
testcase_16 AC 154 ms
90,160 KB
testcase_17 AC 157 ms
91,568 KB
testcase_18 AC 75 ms
75,512 KB
testcase_19 AC 73 ms
71,208 KB
testcase_20 AC 91 ms
88,856 KB
testcase_21 AC 171 ms
93,684 KB
testcase_22 AC 168 ms
93,880 KB
testcase_23 AC 74 ms
71,496 KB
testcase_24 AC 72 ms
71,368 KB
testcase_25 AC 72 ms
71,340 KB
testcase_26 AC 72 ms
71,268 KB
testcase_27 AC 74 ms
71,304 KB
testcase_28 AC 134 ms
86,496 KB
testcase_29 AC 159 ms
91,876 KB
testcase_30 AC 147 ms
89,820 KB
testcase_31 AC 140 ms
87,780 KB
testcase_32 AC 149 ms
90,144 KB
testcase_33 AC 168 ms
93,860 KB
testcase_34 AC 167 ms
93,568 KB
testcase_35 AC 168 ms
94,260 KB
testcase_36 AC 168 ms
94,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def xor_basis(A):
    basis = []
    for a in A:
        v = a
        for b in basis:
            v = min(v, v^b)
        if v:
            basis.append(v)
    return basis

N = int(input())
A = list(map(int, input().split()))
print(pow(2, len(xor_basis(A))))            
0