結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー rlangevinrlangevin
提出日時 2023-01-07 18:30:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 76,492 KB
最終ジャッジ日時 2023-08-21 08:37:20
合計ジャッジ時間 2,950 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,456 KB
testcase_01 AC 70 ms
71,456 KB
testcase_02 AC 67 ms
71,348 KB
testcase_03 AC 70 ms
71,260 KB
testcase_04 AC 73 ms
71,612 KB
testcase_05 AC 69 ms
71,348 KB
testcase_06 AC 70 ms
71,340 KB
testcase_07 AC 75 ms
76,316 KB
testcase_08 AC 75 ms
76,200 KB
testcase_09 AC 75 ms
76,288 KB
testcase_10 AC 77 ms
76,248 KB
testcase_11 AC 75 ms
76,408 KB
testcase_12 AC 69 ms
71,232 KB
testcase_13 AC 69 ms
71,416 KB
testcase_14 AC 74 ms
76,452 KB
testcase_15 AC 77 ms
76,416 KB
testcase_16 AC 69 ms
71,580 KB
testcase_17 AC 76 ms
76,492 KB
testcase_18 AC 79 ms
76,352 KB
testcase_19 AC 75 ms
75,888 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