結果

問題 No.1716 Bonus Nim
ユーザー 👑 kakel-sankakel-san
提出日時 2021-10-22 22:51:19
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 715 bytes
コンパイル時間 1,807 ms
コンパイル使用メモリ 111,256 KB
実行使用メモリ 59,004 KB
最終ジャッジ日時 2023-10-24 14:16:27
合計ジャッジ時間 8,661 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
25,596 KB
testcase_01 AC 29 ms
25,600 KB
testcase_02 AC 29 ms
25,600 KB
testcase_03 AC 29 ms
25,600 KB
testcase_04 AC 258 ms
52,708 KB
testcase_05 AC 265 ms
56,108 KB
testcase_06 AC 259 ms
48,628 KB
testcase_07 AC 263 ms
52,240 KB
testcase_08 AC 267 ms
52,664 KB
testcase_09 AC 262 ms
52,168 KB
testcase_10 AC 268 ms
57,744 KB
testcase_11 AC 261 ms
51,924 KB
testcase_12 AC 263 ms
49,288 KB
testcase_13 AC 269 ms
59,004 KB
testcase_14 AC 261 ms
51,044 KB
testcase_15 AC 261 ms
33,388 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Collections.Generic;
using static System.Console;
using System.Linq;

class yuki319
{
    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 t = NN;
        var res = new bool[t];
        for (var u = 0; u < t; ++u)
        {
            var n = NN;
            var a = NList;
            var nim = a.Aggregate((l, r) => l ^= r);
            res[u] = (nim != 0) | (n % 2 == 1);
        }
        WriteLine(string.Join("\n", res.Select(r => r ? "Alice" : "Bob")));
    }
}
0