結果

問題 No.715 集合と二人ゲーム
ユーザー claw88claw88
提出日時 2018-07-14 02:45:01
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 2,637 bytes
コンパイル時間 1,125 ms
コンパイル使用メモリ 108,288 KB
実行使用メモリ 59,836 KB
最終ジャッジ日時 2024-04-17 11:52:07
合計ジャッジ時間 8,692 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 39 ms
20,480 KB
testcase_07 AC 41 ms
20,216 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 45 ms
20,992 KB
testcase_11 AC 47 ms
21,504 KB
testcase_12 AC 47 ms
20,940 KB
testcase_13 RE -
testcase_14 AC 53 ms
22,196 KB
testcase_15 AC 54 ms
21,864 KB
testcase_16 AC 54 ms
22,392 KB
testcase_17 AC 54 ms
22,108 KB
testcase_18 AC 58 ms
23,296 KB
testcase_19 RE -
testcase_20 AC 65 ms
23,848 KB
testcase_21 AC 62 ms
23,764 KB
testcase_22 AC 63 ms
23,552 KB
testcase_23 RE -
testcase_24 AC 67 ms
24,576 KB
testcase_25 AC 66 ms
24,448 KB
testcase_26 AC 67 ms
24,576 KB
testcase_27 AC 71 ms
25,344 KB
testcase_28 AC 72 ms
25,856 KB
testcase_29 AC 72 ms
25,728 KB
testcase_30 AC 68 ms
24,704 KB
testcase_31 AC 64 ms
23,552 KB
testcase_32 AC 59 ms
23,708 KB
testcase_33 AC 66 ms
24,576 KB
testcase_34 AC 61 ms
23,628 KB
testcase_35 AC 27 ms
18,048 KB
testcase_36 AC 27 ms
17,920 KB
testcase_37 AC 31 ms
18,304 KB
testcase_38 AC 30 ms
18,304 KB
testcase_39 AC 30 ms
18,176 KB
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 RE -
testcase_46 RE -
testcase_47 RE -
testcase_48 RE -
testcase_49 RE -
testcase_50 AC 306 ms
59,524 KB
testcase_51 AC 307 ms
59,836 KB
testcase_52 AC 305 ms
59,180 KB
testcase_53 AC 304 ms
58,672 KB
testcase_54 AC 303 ms
58,996 KB
testcase_55 AC 303 ms
59,372 KB
testcase_56 AC 291 ms
57,200 KB
testcase_57 AC 278 ms
57,508 KB
testcase_58 AC 303 ms
59,148 KB
testcase_59 AC 307 ms
59,744 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 System.Linq;
using System.IO;
//using System.Text;
//using System.Text.RegularExpressions;
//using System.Globalization;
//using System.Diagnostics;
using static System.Console;
//using System.Numerics;
//using static System.Math;
//using pair = Pair<int, int>;

class Program
{
    static void Main()
    {
        //SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
        new Program().solve();
        Out.Flush();
    }
    Scanner cin = new Scanner();
    readonly int[] dd = { 0, 1, 0, -1, 0 }; //→↓←↑
    readonly int mod = 1000000007;
    void chmax<T>(ref T a, T b) where T : IComparable<T> { a = a.CompareTo(b) < 0 ? b : a; }
    void chmin<T>(ref T a, T b) where T : IComparable<T> { a = a.CompareTo(b) < 0 ? a : b; }

   
    void solve()
    {
        int N = cin.nextint;
        var A = cin.scanint;
        Array.Sort(A);
        var memo = new[] { 0, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 0, 5, 2, 2, 3, 3, 0, 1, 1, 3, 0, 2, 1, 1, 0, 4, 5, 2, 7, 4, 0, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 4, 5, 5, 2 };
        var roop = new[] { 3, 3, 0, 1, 1, 3, 0, 2, 1, 1, 0, 4, 5, 3, 7, 4, 8, 1, 1, 2, 0, 3, 1, 1, 0, 3, 3, 2, 2, 4, 4, 5, 5, 9 };

        int G = 0;
        int l = 0;
        for (int i = 1; i <= A.Length; i++)
        {
            if (i == A.Length || A[i] - A[i - 1] > 1)
            {
                int r = -1;
                int x = i - l;
                if (i < 52) r = memo[x];
                else r = roop[(x - 52) % 34];
                G ^= r;
                l = i;
            }
        }
        if (G == 0) WriteLine("Second");
        else WriteLine("First");
    }


}

class Scanner
{
    string[] s; int i;
    char[] cs = new char[] { ' ' };
    public Scanner() { s = new string[0]; i = 0; }
    public string[] scan { get { return ReadLine().Split(); } }
    public int[] scanint { get { return Array.ConvertAll(scan, int.Parse); } }
    public long[] scanlong { get { return Array.ConvertAll(scan, long.Parse); } }
    public double[] scandouble { get { return Array.ConvertAll(scan, double.Parse); } }
    public string next
    {
        get
        {
            if (i < s.Length) return s[i++];
            string st = ReadLine();
            while (st == "") st = ReadLine();
            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            i = 0;
            return next;
        }
    }
    public int nextint { get { return int.Parse(next); } }
    public long nextlong { get { return long.Parse(next); } }
    public double nextdouble { get { return double.Parse(next); } }
}
0