結果

問題 No.2061 XOR Sort
ユーザー tamatotamato
提出日時 2022-08-26 22:21:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 765 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 284,980 KB
最終ジャッジ日時 2024-04-22 00:28:28
合計ジャッジ時間 13,137 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,840 KB
testcase_01 AC 37 ms
52,096 KB
testcase_02 AC 36 ms
51,712 KB
testcase_03 AC 46 ms
60,288 KB
testcase_04 WA -
testcase_05 AC 45 ms
59,776 KB
testcase_06 AC 47 ms
60,160 KB
testcase_07 AC 43 ms
58,240 KB
testcase_08 AC 38 ms
51,840 KB
testcase_09 AC 43 ms
59,008 KB
testcase_10 WA -
testcase_11 AC 41 ms
57,984 KB
testcase_12 AC 45 ms
59,648 KB
testcase_13 AC 39 ms
51,712 KB
testcase_14 AC 465 ms
244,384 KB
testcase_15 AC 446 ms
235,016 KB
testcase_16 AC 798 ms
281,708 KB
testcase_17 AC 586 ms
282,632 KB
testcase_18 AC 572 ms
279,148 KB
testcase_19 AC 579 ms
282,764 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 455 ms
242,024 KB
testcase_23 AC 69 ms
75,776 KB
testcase_24 AC 816 ms
282,232 KB
testcase_25 AC 856 ms
284,208 KB
testcase_26 AC 1,285 ms
282,496 KB
testcase_27 AC 855 ms
284,980 KB
testcase_28 AC 835 ms
283,456 KB
testcase_29 AC 336 ms
197,336 KB
testcase_30 AC 37 ms
51,968 KB
testcase_31 AC 88 ms
78,976 KB
testcase_32 AC 37 ms
51,840 KB
testcase_33 AC 35 ms
51,968 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 38 ms
52,224 KB
testcase_40 WA -
testcase_41 AC 37 ms
52,224 KB
testcase_42 WA -
testcase_43 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    A = [list(map(int, input().split()))]

    ans = 1
    for i in range(31):
        flg = 0
        A_new = []
        for AA in A:
            seen = [0, 0]
            a0 = []
            a1 = []
            for a in AA:
                seen[a >> i & 1] = 1
                if a >> i & 1:
                    a1.append(a)
                else:
                    a0.append(a)
            if seen[0] * seen[1]:
                flg = 1
            if a0:
                A_new.append(a0)
            if a1:
                A_new.append(a1)
        if flg:
            ans = (ans * 2) % mod
        A = A_new
    print(ans)


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