結果

問題 No.2619 Sorted Nim
ユーザー heno239
提出日時 2024-02-02 15:59:49
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 726 bytes
コンパイル時間 10,612 ms
コンパイル使用メモリ 166,592 KB
実行使用メモリ 205,528 KB
最終ジャッジ日時 2024-09-28 10:36:11
合計ジャッジ時間 16,858 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 48 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (121 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Diagnostics;
using System.Numerics;
using System.Linq;

namespace ConsoleApplication1
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] a=Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int x = 0;
            for (int i = 0; i < n; i += 2)
            {
                int v = a[i];
                if (i > 0) v -= a[i - 1];
                x ^= v;
            }

            if (x>0)
            {
                Console.WriteLine("First");
            }
            else
            {
                Console.WriteLine("Second");
            }
        }
    }
}
0