結果

問題 No.2619 Sorted Nim
ユーザー 👑 kakel-sankakel-san
提出日時 2024-01-26 22:56:10
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 673 bytes
コンパイル時間 7,006 ms
コンパイル使用メモリ 157,912 KB
実行使用メモリ 193,376 KB
最終ジャッジ日時 2024-01-26 22:56:28
合計ジャッジ時間 16,504 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
32,676 KB
testcase_01 AC 76 ms
32,676 KB
testcase_02 AC 106 ms
45,732 KB
testcase_03 AC 110 ms
47,832 KB
testcase_04 AC 110 ms
45,892 KB
testcase_05 AC 108 ms
45,776 KB
testcase_06 AC 114 ms
49,044 KB
testcase_07 AC 107 ms
45,716 KB
testcase_08 AC 116 ms
48,184 KB
testcase_09 AC 77 ms
32,676 KB
testcase_10 AC 113 ms
47,976 KB
testcase_11 AC 109 ms
46,624 KB
testcase_12 AC 111 ms
47,640 KB
testcase_13 AC 78 ms
32,676 KB
testcase_14 AC 115 ms
47,976 KB
testcase_15 AC 111 ms
46,752 KB
testcase_16 AC 115 ms
48,328 KB
testcase_17 AC 117 ms
48,852 KB
testcase_18 AC 115 ms
48,168 KB
testcase_19 AC 106 ms
45,556 KB
testcase_20 AC 108 ms
45,572 KB
testcase_21 AC 116 ms
49,196 KB
testcase_22 AC 108 ms
46,452 KB
testcase_23 AC 113 ms
47,644 KB
testcase_24 AC 129 ms
48,492 KB
testcase_25 AC 114 ms
48,332 KB
testcase_26 AC 112 ms
47,116 KB
testcase_27 AC 107 ms
45,716 KB
testcase_28 AC 115 ms
49,044 KB
testcase_29 AC 115 ms
48,504 KB
testcase_30 AC 112 ms
47,280 KB
testcase_31 AC 77 ms
32,676 KB
testcase_32 AC 107 ms
45,956 KB
testcase_33 AC 109 ms
46,780 KB
testcase_34 AC 107 ms
45,892 KB
testcase_35 AC 112 ms
47,136 KB
testcase_36 AC 113 ms
47,848 KB
testcase_37 AC 78 ms
32,676 KB
testcase_38 AC 109 ms
46,052 KB
testcase_39 AC 113 ms
48,156 KB
testcase_40 AC 111 ms
46,448 KB
testcase_41 AC 111 ms
46,580 KB
testcase_42 AC 109 ms
45,556 KB
testcase_43 AC 115 ms
48,156 KB
testcase_44 AC 112 ms
47,484 KB
testcase_45 AC 114 ms
48,152 KB
testcase_46 AC 111 ms
47,120 KB
testcase_47 AC 109 ms
45,732 KB
testcase_48 AC 78 ms
32,676 KB
testcase_49 AC 111 ms
46,752 KB
testcase_50 AC 109 ms
45,732 KB
testcase_51 AC 112 ms
46,768 KB
testcase_52 AC 78 ms
32,676 KB
testcase_53 AC 124 ms
49,204 KB
testcase_54 AC 111 ms
46,404 KB
testcase_55 AC 116 ms
48,840 KB
testcase_56 AC 111 ms
46,780 KB
testcase_57 AC 120 ms
48,548 KB
testcase_58 AC 118 ms
48,476 KB
testcase_59 AC 112 ms
46,768 KB
testcase_60 AC 110 ms
46,052 KB
testcase_61 AC 111 ms
193,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (101 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

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 = 0;
        for (var i = 0; i < n; ++i)
        {
            if ((n - i) % 2 == 1)
            {
                if (i == 0) ans ^= a[0];
                else ans ^= a[i] - a[i - 1];
            }
        }
        WriteLine(ans == 0 ? "Second" : "First");
    }
}
0