結果

問題 No.2061 XOR Sort
ユーザー tamato
提出日時 2022-08-26 22:16:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 99,968 KB
最終ジャッジ日時 2024-10-13 22:52:41
合計ジャッジ時間 4,087 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 13
権限があれば一括ダウンロードができます

ソースコード

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):
        seen = [0, 0]
        for a in A:
            seen[a >> i & 1] = 1
        if seen[0] == seen[1] == 1:
            ans = (ans * 2) % mod
    print(ans)


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