結果

問題 No.2061 XOR Sort
ユーザー ああいいああいい
提出日時 2022-08-28 15:32:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 728 ms / 2,000 ms
コード長 613 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 82,136 KB
実行使用メモリ 296,472 KB
最終ジャッジ日時 2024-04-23 13:56:36
合計ジャッジ時間 10,324 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,840 KB
testcase_01 AC 40 ms
51,968 KB
testcase_02 AC 35 ms
52,352 KB
testcase_03 AC 40 ms
59,520 KB
testcase_04 AC 35 ms
51,840 KB
testcase_05 AC 37 ms
58,112 KB
testcase_06 AC 37 ms
58,112 KB
testcase_07 AC 38 ms
58,368 KB
testcase_08 AC 33 ms
52,480 KB
testcase_09 AC 35 ms
58,112 KB
testcase_10 AC 34 ms
52,096 KB
testcase_11 AC 39 ms
52,096 KB
testcase_12 AC 38 ms
58,112 KB
testcase_13 AC 33 ms
52,096 KB
testcase_14 AC 363 ms
221,376 KB
testcase_15 AC 361 ms
221,952 KB
testcase_16 AC 728 ms
296,472 KB
testcase_17 AC 459 ms
272,852 KB
testcase_18 AC 472 ms
274,764 KB
testcase_19 AC 463 ms
271,292 KB
testcase_20 AC 87 ms
83,948 KB
testcase_21 AC 212 ms
151,024 KB
testcase_22 AC 352 ms
222,532 KB
testcase_23 AC 54 ms
72,764 KB
testcase_24 AC 682 ms
292,680 KB
testcase_25 AC 660 ms
292,932 KB
testcase_26 AC 678 ms
292,012 KB
testcase_27 AC 679 ms
292,800 KB
testcase_28 AC 678 ms
292,792 KB
testcase_29 AC 118 ms
115,756 KB
testcase_30 AC 34 ms
51,840 KB
testcase_31 AC 57 ms
76,008 KB
testcase_32 AC 33 ms
52,568 KB
testcase_33 AC 32 ms
52,876 KB
testcase_34 AC 32 ms
52,964 KB
testcase_35 AC 33 ms
52,420 KB
testcase_36 AC 33 ms
53,116 KB
testcase_37 AC 38 ms
52,612 KB
testcase_38 AC 39 ms
52,452 KB
testcase_39 AC 38 ms
52,756 KB
testcase_40 AC 43 ms
53,436 KB
testcase_41 AC 47 ms
53,320 KB
testcase_42 AC 38 ms
52,896 KB
testcase_43 AC 34 ms
53,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
P = 998244353

count = 0

l = [A]
for i in range(29,-1,-1):
    mask = 1 << i
    nx = []
    flag = False
    for ll in l:
        left = []
        right = []
        for u in ll:
            if u & mask == 0:
                left.append(u)
            else:
                right.append(u)
        if len(left) == 0 or len(right) == 0:
            pass
        else:
            flag = True
        if len(left):
            nx.append(left)
        if len(right):
            nx.append(right)
    if flag:
        count += 1
    l = nx
print(pow(2,count,P))
0