結果

問題 No.2061 XOR Sort
ユーザー 👑 kakel-sankakel-san
提出日時 2023-10-09 14:24:27
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 787 bytes
コンパイル時間 1,001 ms
コンパイル使用メモリ 70,200 KB
実行使用メモリ 43,648 KB
最終ジャッジ日時 2023-10-09 14:24:36
合計ジャッジ時間 9,356 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
23,836 KB
testcase_01 AC 60 ms
21,744 KB
testcase_02 AC 58 ms
19,680 KB
testcase_03 AC 58 ms
19,676 KB
testcase_04 AC 58 ms
23,768 KB
testcase_05 AC 59 ms
21,600 KB
testcase_06 AC 59 ms
23,716 KB
testcase_07 AC 59 ms
21,672 KB
testcase_08 AC 59 ms
21,740 KB
testcase_09 AC 59 ms
19,648 KB
testcase_10 AC 58 ms
21,612 KB
testcase_11 AC 56 ms
21,624 KB
testcase_12 AC 62 ms
21,712 KB
testcase_13 AC 59 ms
23,664 KB
testcase_14 AC 128 ms
29,260 KB
testcase_15 AC 122 ms
29,340 KB
testcase_16 AC 193 ms
43,432 KB
testcase_17 AC 148 ms
36,840 KB
testcase_18 AC 149 ms
35,048 KB
testcase_19 AC 150 ms
38,956 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 126 ms
31,332 KB
testcase_23 WA -
testcase_24 AC 194 ms
41,552 KB
testcase_25 AC 194 ms
41,620 KB
testcase_26 AC 198 ms
41,560 KB
testcase_27 AC 203 ms
43,620 KB
testcase_28 AC 194 ms
43,648 KB
testcase_29 AC 96 ms
24,132 KB
testcase_30 AC 56 ms
21,692 KB
testcase_31 AC 67 ms
22,160 KB
testcase_32 AC 58 ms
23,752 KB
testcase_33 AC 57 ms
21,744 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 #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var a = NList;
        var ans = 1L;
        var mod = 998_244_353;
        for (var i = 0; i < 30; ++i)
        {
            var zero = 0;
            var one = 0;
            foreach (var ai in a)
            {
                if (((ai >> i) & 1) == 0) ++zero;
                else ++one;
            }
            if (zero > 0 && one > 0) ans = ans * 2 % mod;
        }
        WriteLine(ans);
    }
}
0