結果

問題 No.2061 XOR Sort
ユーザー chineristACchineristAC
提出日時 2022-08-26 23:27:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,211 ms / 2,000 ms
コード長 688 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 123,860 KB
最終ジャッジ日時 2024-04-22 01:34:11
合計ジャッジ時間 14,930 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
56,320 KB
testcase_01 AC 48 ms
55,856 KB
testcase_02 AC 47 ms
57,396 KB
testcase_03 AC 52 ms
64,588 KB
testcase_04 AC 48 ms
57,240 KB
testcase_05 AC 52 ms
62,676 KB
testcase_06 AC 51 ms
63,036 KB
testcase_07 AC 51 ms
62,388 KB
testcase_08 AC 48 ms
56,516 KB
testcase_09 AC 52 ms
64,184 KB
testcase_10 AC 46 ms
56,968 KB
testcase_11 AC 48 ms
55,856 KB
testcase_12 AC 52 ms
63,056 KB
testcase_13 AC 47 ms
57,304 KB
testcase_14 AC 611 ms
93,796 KB
testcase_15 AC 597 ms
94,024 KB
testcase_16 AC 1,099 ms
122,192 KB
testcase_17 AC 759 ms
96,172 KB
testcase_18 AC 796 ms
96,056 KB
testcase_19 AC 762 ms
96,212 KB
testcase_20 AC 204 ms
79,184 KB
testcase_21 AC 389 ms
85,912 KB
testcase_22 AC 610 ms
94,044 KB
testcase_23 AC 97 ms
77,588 KB
testcase_24 AC 1,211 ms
123,476 KB
testcase_25 AC 1,181 ms
123,860 KB
testcase_26 AC 1,135 ms
122,848 KB
testcase_27 AC 1,150 ms
122,316 KB
testcase_28 AC 1,144 ms
123,204 KB
testcase_29 AC 193 ms
116,232 KB
testcase_30 AC 47 ms
55,844 KB
testcase_31 AC 92 ms
78,640 KB
testcase_32 AC 47 ms
56,592 KB
testcase_33 AC 48 ms
57,516 KB
testcase_34 AC 49 ms
57,780 KB
testcase_35 AC 48 ms
57,116 KB
testcase_36 AC 48 ms
58,336 KB
testcase_37 AC 49 ms
58,456 KB
testcase_38 AC 49 ms
58,164 KB
testcase_39 AC 48 ms
56,608 KB
testcase_40 AC 48 ms
57,612 KB
testcase_41 AC 48 ms
57,504 KB
testcase_42 AC 49 ms
56,864 KB
testcase_43 AC 49 ms
56,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush
from itertools import cycle, permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

N = int(input())
A = li()

res = 1
check = [0] * 30

def calc(_A,n):
    if n==-1:
        return 
    X = [a for a in _A if a>>n & 1]
    Y = [a for a in _A if a>>n & 1 == 0]
    if X and Y:
        check[n] = 1
    if n!=0:
        if X:
            calc(X,n-1)
        if Y:
            calc(Y,n-1)

calc(A,29)

for i in range(30):
    if check[i]:
        res *= 2


print(res % 998244353)
0