結果

問題 No.2061 XOR Sort
ユーザー shotoyooshotoyoo
提出日時 2022-08-26 22:10:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,013 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 224,792 KB
最終ジャッジ日時 2024-04-22 00:15:58
合計ジャッジ時間 5,375 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
54,272 KB
testcase_01 AC 33 ms
54,184 KB
testcase_02 AC 35 ms
54,528 KB
testcase_03 AC 40 ms
61,744 KB
testcase_04 AC 34 ms
54,528 KB
testcase_05 AC 38 ms
60,800 KB
testcase_06 AC 40 ms
60,544 KB
testcase_07 AC 37 ms
60,288 KB
testcase_08 AC 34 ms
54,528 KB
testcase_09 AC 38 ms
60,288 KB
testcase_10 AC 34 ms
54,656 KB
testcase_11 AC 38 ms
60,288 KB
testcase_12 AC 37 ms
60,416 KB
testcase_13 AC 33 ms
54,272 KB
testcase_14 AC 169 ms
133,440 KB
testcase_15 AC 166 ms
133,148 KB
testcase_16 AC 243 ms
224,168 KB
testcase_17 AC 167 ms
155,180 KB
testcase_18 AC 166 ms
155,176 KB
testcase_19 AC 166 ms
155,080 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 168 ms
133,176 KB
testcase_23 WA -
testcase_24 AC 246 ms
224,420 KB
testcase_25 AC 249 ms
224,448 KB
testcase_26 AC 256 ms
224,792 KB
testcase_27 AC 250 ms
224,672 KB
testcase_28 AC 248 ms
224,744 KB
testcase_29 AC 114 ms
126,528 KB
testcase_30 AC 33 ms
54,272 KB
testcase_31 AC 50 ms
76,800 KB
testcase_32 AC 36 ms
54,528 KB
testcase_33 AC 33 ms
54,400 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input())
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

n = int(input())
a = list(map(int, input().split()))
dp = [a]
ans = 1
M = 998244353
for b in range(31)[::-1]:
    ndp = []
    ok = 0
    for item in dp:
        vs = [[], []]
        for v in item:
            vs[v>>b&1].append(v)
        if vs[0] and vs[1]:
            ok = 1
        if vs[0]:
            ndp.append(vs[0])
        if vs[1]:
            ndp.append(vs[1])
    if ok:
        ans *= 2
        ans %= M
print(ans%M)
0