結果

問題 No.2061 XOR Sort
ユーザー prussian_coderprussian_coder
提出日時 2022-08-27 13:14:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 766 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 214,340 KB
最終ジャッジ日時 2024-04-22 11:54:21
合計ジャッジ時間 11,306 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,852 KB
testcase_01 AC 38 ms
53,372 KB
testcase_02 AC 38 ms
53,672 KB
testcase_03 AC 44 ms
60,016 KB
testcase_04 AC 37 ms
53,056 KB
testcase_05 AC 43 ms
59,524 KB
testcase_06 AC 47 ms
62,496 KB
testcase_07 AC 40 ms
57,328 KB
testcase_08 AC 41 ms
52,500 KB
testcase_09 AC 47 ms
61,760 KB
testcase_10 AC 38 ms
52,624 KB
testcase_11 AC 39 ms
53,276 KB
testcase_12 AC 43 ms
59,116 KB
testcase_13 AC 37 ms
52,952 KB
testcase_14 AC 381 ms
131,696 KB
testcase_15 AC 372 ms
129,596 KB
testcase_16 AC 732 ms
211,644 KB
testcase_17 AC 476 ms
151,308 KB
testcase_18 AC 483 ms
153,232 KB
testcase_19 AC 477 ms
151,260 KB
testcase_20 AC 113 ms
80,368 KB
testcase_21 AC 244 ms
102,236 KB
testcase_22 AC 451 ms
130,540 KB
testcase_23 AC 70 ms
74,552 KB
testcase_24 AC 757 ms
214,216 KB
testcase_25 AC 758 ms
213,744 KB
testcase_26 AC 766 ms
214,228 KB
testcase_27 AC 760 ms
214,340 KB
testcase_28 AC 761 ms
214,236 KB
testcase_29 AC 349 ms
204,932 KB
testcase_30 AC 37 ms
53,316 KB
testcase_31 AC 89 ms
78,704 KB
testcase_32 AC 39 ms
53,688 KB
testcase_33 AC 38 ms
53,536 KB
testcase_34 AC 38 ms
53,720 KB
testcase_35 AC 38 ms
51,988 KB
testcase_36 AC 38 ms
53,436 KB
testcase_37 AC 38 ms
53,032 KB
testcase_38 AC 38 ms
52,944 KB
testcase_39 AC 38 ms
52,328 KB
testcase_40 AC 38 ms
52,792 KB
testcase_41 AC 38 ms
52,244 KB
testcase_42 AC 38 ms
52,824 KB
testcase_43 AC 38 ms
53,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
ans=1
A=set()
I=tuple(set([int(x) for x in input().split()]))
A.add(I)
mod=998244353
for i in reversed(range(30)):
	B=set()
	flag=False
	for La in A:
		u=set()
		v=set()
		for a in La:
			if (a>>i)&1:
				u.add(a)
			else:
				v.add(a)
		if len(u)>=1 and len(v)>=1:
			flag=True
		if len(u)>=2:
			B.add(tuple(u))
		if len(v)>=2:
			B.add(tuple(v))
	if flag:
		ans*=2
		ans%=mod
	A=B.copy()
print(ans)	
0