結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー eSeFeSeF
提出日時 2020-06-08 00:50:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 178 ms / 5,000 ms
コード長 564 bytes
コンパイル時間 2,851 ms
コンパイル使用メモリ 105,368 KB
実行使用メモリ 41,752 KB
最終ジャッジ日時 2023-09-17 18:14:59
合計ジャッジ時間 9,032 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
23,592 KB
testcase_01 AC 60 ms
21,528 KB
testcase_02 AC 60 ms
21,500 KB
testcase_03 AC 64 ms
21,588 KB
testcase_04 AC 63 ms
21,568 KB
testcase_05 AC 63 ms
19,596 KB
testcase_06 AC 63 ms
21,648 KB
testcase_07 AC 64 ms
23,536 KB
testcase_08 AC 153 ms
39,004 KB
testcase_09 AC 86 ms
22,712 KB
testcase_10 AC 125 ms
28,656 KB
testcase_11 AC 111 ms
29,368 KB
testcase_12 AC 162 ms
38,156 KB
testcase_13 AC 166 ms
38,664 KB
testcase_14 AC 123 ms
28,488 KB
testcase_15 AC 176 ms
39,444 KB
testcase_16 AC 161 ms
35,764 KB
testcase_17 AC 162 ms
40,520 KB
testcase_18 AC 62 ms
19,500 KB
testcase_19 AC 60 ms
21,548 KB
testcase_20 AC 95 ms
28,740 KB
testcase_21 AC 174 ms
41,752 KB
testcase_22 AC 173 ms
39,628 KB
testcase_23 AC 61 ms
23,712 KB
testcase_24 AC 60 ms
19,468 KB
testcase_25 AC 60 ms
21,464 KB
testcase_26 AC 61 ms
21,564 KB
testcase_27 AC 63 ms
21,464 KB
testcase_28 AC 127 ms
31,352 KB
testcase_29 AC 159 ms
38,388 KB
testcase_30 AC 149 ms
37,368 KB
testcase_31 AC 139 ms
38,036 KB
testcase_32 AC 152 ms
38,152 KB
testcase_33 AC 172 ms
39,412 KB
testcase_34 AC 170 ms
39,256 KB
testcase_35 AC 178 ms
41,572 KB
testcase_36 AC 173 ms
41,456 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;
class Solution
{
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());
        var A = Array.ConvertAll(Console.ReadLine().Split(), long.Parse);
        var bases = new List<long>();
        for(var i = 0; i < N; i++)
        {
            long v = A[i];
            foreach(var e in bases)
            {
                v = Math.Min(v, v ^ e);
            }
            if (v != 0) bases.Add(v);
        }
        Console.WriteLine(1L << bases.Count());
    }
}
0