結果

問題 No.1852 Divide or Reduce
ユーザー 👑 kakel-sankakel-san
提出日時 2023-11-30 22:09:48
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 316 ms / 2,000 ms
コード長 823 bytes
コンパイル時間 16,374 ms
コンパイル使用メモリ 158,860 KB
実行使用メモリ 239,516 KB
最終ジャッジ日時 2023-11-30 22:10:16
合計ジャッジ時間 26,923 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
32,676 KB
testcase_01 AC 215 ms
57,380 KB
testcase_02 AC 200 ms
57,380 KB
testcase_03 AC 190 ms
57,380 KB
testcase_04 AC 190 ms
57,380 KB
testcase_05 AC 188 ms
57,380 KB
testcase_06 AC 200 ms
73,008 KB
testcase_07 AC 217 ms
80,740 KB
testcase_08 AC 207 ms
78,112 KB
testcase_09 AC 205 ms
79,672 KB
testcase_10 AC 195 ms
77,008 KB
testcase_11 AC 198 ms
76,588 KB
testcase_12 AC 200 ms
76,664 KB
testcase_13 AC 216 ms
76,572 KB
testcase_14 AC 200 ms
76,572 KB
testcase_15 AC 199 ms
76,716 KB
testcase_16 AC 299 ms
87,708 KB
testcase_17 AC 294 ms
87,836 KB
testcase_18 AC 316 ms
87,712 KB
testcase_19 AC 263 ms
82,544 KB
testcase_20 AC 305 ms
239,516 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (94 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();
    static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var t = NN;
        var ans = new bool[t];
        for (var u = 0; u < t; ++u)
        {
            var n = NN;
            var a = NList;
            var ecount = a.Count(ai => ai % 2 == 0);
            ans[u] = ecount % 2 == 1 || (a.Min() % 2 == 0 && (n - ecount) % 2 == 0);
        }
        WriteLine(string.Join("\n", ans.Select(f => f ? "First" : "Second")));
    }
}
0