結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー 双六双六
提出日時 2020-07-27 02:34:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 188 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 87,412 KB
実行使用メモリ 92,956 KB
最終ジャッジ日時 2023-09-17 18:26:37
合計ジャッジ時間 7,218 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,400 KB
testcase_01 AC 88 ms
71,624 KB
testcase_02 AC 89 ms
71,812 KB
testcase_03 AC 88 ms
71,732 KB
testcase_04 AC 90 ms
71,856 KB
testcase_05 AC 91 ms
71,796 KB
testcase_06 AC 90 ms
71,760 KB
testcase_07 AC 89 ms
71,472 KB
testcase_08 AC 158 ms
87,544 KB
testcase_09 AC 111 ms
77,956 KB
testcase_10 AC 142 ms
84,184 KB
testcase_11 AC 129 ms
81,632 KB
testcase_12 AC 167 ms
90,176 KB
testcase_13 AC 173 ms
90,868 KB
testcase_14 AC 139 ms
84,064 KB
testcase_15 AC 179 ms
92,920 KB
testcase_16 AC 163 ms
89,124 KB
testcase_17 AC 171 ms
90,604 KB
testcase_18 AC 94 ms
76,664 KB
testcase_19 AC 87 ms
71,620 KB
testcase_20 AC 109 ms
90,004 KB
testcase_21 AC 183 ms
92,496 KB
testcase_22 AC 181 ms
92,956 KB
testcase_23 AC 87 ms
71,436 KB
testcase_24 AC 93 ms
71,824 KB
testcase_25 AC 90 ms
71,676 KB
testcase_26 AC 89 ms
71,856 KB
testcase_27 AC 89 ms
71,608 KB
testcase_28 AC 146 ms
84,968 KB
testcase_29 AC 168 ms
90,616 KB
testcase_30 AC 159 ms
88,960 KB
testcase_31 AC 151 ms
87,524 KB
testcase_32 AC 163 ms
89,264 KB
testcase_33 AC 188 ms
92,824 KB
testcase_34 AC 176 ms
92,412 KB
testcase_35 AC 183 ms
92,844 KB
testcase_36 AC 184 ms
92,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	A = getlist()
	bases = []
	for i in range(N):
		a = A[i]
		for x in bases:
			a = min(a, a ^ x)
		if a != 0:
			bases.append(a)

	ans = 2 ** (len(bases))
	print(ans)

if __name__ == '__main__':
	main()
0