結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー titiatitia
提出日時 2022-05-10 04:12:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 588 ms / 5,000 ms
コード長 326 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 20,764 KB
最終ジャッジ日時 2023-09-24 08:30:30
合計ジャッジ時間 11,753 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,796 KB
testcase_01 AC 16 ms
7,800 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 16 ms
7,760 KB
testcase_04 AC 17 ms
7,844 KB
testcase_05 AC 16 ms
7,800 KB
testcase_06 AC 15 ms
7,804 KB
testcase_07 AC 16 ms
7,860 KB
testcase_08 AC 416 ms
17,132 KB
testcase_09 AC 98 ms
9,908 KB
testcase_10 AC 321 ms
14,928 KB
testcase_11 AC 233 ms
13,040 KB
testcase_12 AC 487 ms
18,520 KB
testcase_13 AC 511 ms
19,340 KB
testcase_14 AC 302 ms
14,388 KB
testcase_15 AC 555 ms
20,496 KB
testcase_16 AC 468 ms
19,224 KB
testcase_17 AC 497 ms
18,988 KB
testcase_18 AC 16 ms
7,844 KB
testcase_19 AC 16 ms
7,856 KB
testcase_20 AC 57 ms
10,076 KB
testcase_21 AC 588 ms
20,644 KB
testcase_22 AC 579 ms
20,624 KB
testcase_23 AC 15 ms
7,832 KB
testcase_24 AC 15 ms
7,860 KB
testcase_25 AC 15 ms
7,792 KB
testcase_26 AC 16 ms
7,764 KB
testcase_27 AC 15 ms
7,800 KB
testcase_28 AC 353 ms
15,660 KB
testcase_29 AC 482 ms
19,032 KB
testcase_30 AC 421 ms
18,512 KB
testcase_31 AC 356 ms
16,300 KB
testcase_32 AC 453 ms
19,164 KB
testcase_33 AC 565 ms
20,484 KB
testcase_34 AC 555 ms
20,312 KB
testcase_35 AC 576 ms
20,764 KB
testcase_36 AC 568 ms
20,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))

# xorの掃き出し法・基底

BASE=[]

def sweep(x):
    for b in BASE:
        if b^x<x:
            x=b^x
    return x

for a in A:
    k=sweep(a)
    if k!=0: # 掃き出した値が0でないなら基底に入れる。
        BASE.append(k)

print(pow(2,(len(BASE))))
0