結果

問題 No.2059 Odd Move Nim
ユーザー 👑 kakel-sankakel-san
提出日時 2023-10-09 14:21:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 513 bytes
コンパイル時間 1,059 ms
コンパイル使用メモリ 68,220 KB
実行使用メモリ 45,484 KB
最終ジャッジ日時 2023-10-09 14:22:02
合計ジャッジ時間 6,046 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
19,616 KB
testcase_01 AC 59 ms
23,656 KB
testcase_02 AC 58 ms
23,640 KB
testcase_03 AC 60 ms
21,556 KB
testcase_04 AC 58 ms
23,660 KB
testcase_05 AC 59 ms
23,660 KB
testcase_06 AC 60 ms
23,712 KB
testcase_07 AC 59 ms
23,672 KB
testcase_08 AC 58 ms
21,684 KB
testcase_09 AC 58 ms
21,552 KB
testcase_10 AC 59 ms
21,500 KB
testcase_11 AC 59 ms
21,624 KB
testcase_12 AC 149 ms
41,508 KB
testcase_13 AC 151 ms
43,648 KB
testcase_14 AC 152 ms
41,688 KB
testcase_15 AC 176 ms
45,484 KB
testcase_16 AC 150 ms
41,476 KB
testcase_17 AC 151 ms
43,600 KB
testcase_18 AC 152 ms
43,716 KB
testcase_19 AC 152 ms
41,524 KB
testcase_20 AC 151 ms
41,660 KB
testcase_21 AC 149 ms
41,652 KB
testcase_22 AC 81 ms
21,616 KB
権限があれば一括ダウンロードができます

ソースコード

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 xor = 0;
        for (var i = 1; i < n; i += 2) xor ^= a[i];
        WriteLine(xor == 0 ? "Bob" : "Alice");
    }
}
0