結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー ayaoniayaoni
提出日時 2021-08-31 00:19:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 173 ms / 5,000 ms
コード長 592 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 94,340 KB
最終ジャッジ日時 2023-08-16 00:57:54
合計ジャッジ時間 8,271 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,440 KB
testcase_01 AC 68 ms
71,404 KB
testcase_02 AC 69 ms
71,188 KB
testcase_03 AC 69 ms
71,424 KB
testcase_04 AC 67 ms
71,496 KB
testcase_05 AC 70 ms
71,452 KB
testcase_06 AC 70 ms
71,424 KB
testcase_07 AC 71 ms
71,404 KB
testcase_08 AC 136 ms
88,256 KB
testcase_09 AC 87 ms
77,324 KB
testcase_10 AC 124 ms
85,248 KB
testcase_11 AC 110 ms
82,072 KB
testcase_12 AC 153 ms
91,700 KB
testcase_13 AC 161 ms
92,404 KB
testcase_14 AC 117 ms
85,116 KB
testcase_15 AC 166 ms
93,916 KB
testcase_16 AC 146 ms
90,376 KB
testcase_17 AC 159 ms
92,104 KB
testcase_18 AC 71 ms
75,920 KB
testcase_19 AC 70 ms
71,524 KB
testcase_20 AC 87 ms
89,348 KB
testcase_21 AC 172 ms
93,724 KB
testcase_22 AC 173 ms
93,644 KB
testcase_23 AC 71 ms
71,392 KB
testcase_24 AC 72 ms
71,300 KB
testcase_25 AC 71 ms
71,612 KB
testcase_26 AC 71 ms
71,268 KB
testcase_27 AC 71 ms
71,588 KB
testcase_28 AC 130 ms
86,476 KB
testcase_29 AC 153 ms
92,180 KB
testcase_30 AC 143 ms
90,000 KB
testcase_31 AC 132 ms
88,168 KB
testcase_32 AC 153 ms
90,324 KB
testcase_33 AC 170 ms
94,152 KB
testcase_34 AC 164 ms
94,064 KB
testcase_35 AC 171 ms
94,136 KB
testcase_36 AC 171 ms
94,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
A = LI()

basis = []
for a in A:
    for b in basis:
        if a^b < a:
            a ^= b
    if a:
        basis.append(a)

ans = pow(2,len(basis))
print(ans)
0