結果

問題 No.2044 Infinite Nim
ユーザー 👑 kakel-sankakel-san
提出日時 2022-08-19 22:13:32
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 748 bytes
コンパイル時間 1,037 ms
コンパイル使用メモリ 107,520 KB
実行使用メモリ 33,920 KB
最終ジャッジ日時 2024-04-17 00:54:04
合計ジャッジ時間 4,084 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
18,816 KB
testcase_01 AC 31 ms
18,944 KB
testcase_02 AC 30 ms
19,072 KB
testcase_03 AC 31 ms
18,944 KB
testcase_04 AC 30 ms
18,944 KB
testcase_05 AC 29 ms
18,944 KB
testcase_06 AC 29 ms
18,816 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 30 ms
18,944 KB
testcase_10 AC 30 ms
19,072 KB
testcase_11 AC 29 ms
18,944 KB
testcase_12 AC 29 ms
18,944 KB
testcase_13 AC 55 ms
23,188 KB
testcase_14 AC 46 ms
21,888 KB
testcase_15 WA -
testcase_16 AC 45 ms
21,888 KB
testcase_17 AC 60 ms
24,576 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 54 ms
22,960 KB
testcase_21 WA -
testcase_22 AC 52 ms
22,804 KB
testcase_23 AC 47 ms
22,400 KB
testcase_24 AC 60 ms
24,064 KB
testcase_25 AC 49 ms
22,576 KB
testcase_26 AC 58 ms
24,192 KB
testcase_27 AC 45 ms
21,708 KB
testcase_28 AC 69 ms
26,112 KB
testcase_29 AC 52 ms
23,936 KB
testcase_30 AC 59 ms
24,320 KB
testcase_31 AC 74 ms
27,264 KB
testcase_32 AC 72 ms
27,392 KB
testcase_33 AC 72 ms
27,392 KB
testcase_34 AC 60 ms
25,288 KB
testcase_35 AC 92 ms
33,920 KB
testcase_36 AC 30 ms
19,072 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 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();
    static int[][] NArr(int n) => Enumerable.Repeat(0, n).Select(_ => NList).ToArray();
    static void Main()
    {
        var n = NN;
        var a = NList;
        var infcnt = 0;
        foreach (var ai in a) if (ai == -1) ++infcnt;
        if (infcnt > 0)
        {
            WriteLine(infcnt % 2 == 0 ? "Second" : "First");
        }
        else
        {
            var xor = a.Aggregate((l, r) => l ^ r);
            WriteLine(xor == 0 ? "Second" : "First");
        }
    }
}
0