結果
問題 | No.715 集合と二人ゲーム |
ユーザー | claw88 |
提出日時 | 2018-07-14 02:45:01 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 2,637 bytes |
コンパイル時間 | 2,701 ms |
コンパイル使用メモリ | 116,716 KB |
実行使用メモリ | 59,744 KB |
最終ジャッジ日時 | 2024-10-09 05:56:38 |
合計ジャッジ時間 | 8,388 ms |
ジャッジサーバーID (参考情報) |
judge4 / 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,224 KB |
testcase_07 | AC | 40 ms
20,216 KB |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | AC | 42 ms
20,864 KB |
testcase_11 | AC | 45 ms
21,376 KB |
testcase_12 | AC | 46 ms
20,944 KB |
testcase_13 | RE | - |
testcase_14 | AC | 51 ms
21,808 KB |
testcase_15 | AC | 51 ms
21,728 KB |
testcase_16 | AC | 52 ms
22,400 KB |
testcase_17 | AC | 51 ms
21,992 KB |
testcase_18 | AC | 56 ms
23,168 KB |
testcase_19 | RE | - |
testcase_20 | AC | 59 ms
23,720 KB |
testcase_21 | AC | 60 ms
23,888 KB |
testcase_22 | AC | 61 ms
23,296 KB |
testcase_23 | RE | - |
testcase_24 | AC | 64 ms
24,576 KB |
testcase_25 | AC | 65 ms
24,448 KB |
testcase_26 | AC | 65 ms
24,576 KB |
testcase_27 | AC | 74 ms
25,088 KB |
testcase_28 | AC | 75 ms
25,344 KB |
testcase_29 | AC | 72 ms
25,472 KB |
testcase_30 | AC | 68 ms
24,448 KB |
testcase_31 | AC | 62 ms
23,552 KB |
testcase_32 | AC | 59 ms
23,448 KB |
testcase_33 | AC | 65 ms
24,192 KB |
testcase_34 | AC | 60 ms
23,376 KB |
testcase_35 | AC | 26 ms
18,048 KB |
testcase_36 | AC | 26 ms
17,920 KB |
testcase_37 | AC | 26 ms
17,664 KB |
testcase_38 | AC | 26 ms
17,920 KB |
testcase_39 | AC | 26 ms
17,920 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 | 303 ms
59,260 KB |
testcase_51 | AC | 304 ms
59,592 KB |
testcase_52 | AC | 299 ms
58,928 KB |
testcase_53 | AC | 303 ms
58,416 KB |
testcase_54 | AC | 298 ms
58,744 KB |
testcase_55 | AC | 304 ms
59,120 KB |
testcase_56 | AC | 286 ms
56,948 KB |
testcase_57 | AC | 273 ms
57,260 KB |
testcase_58 | AC | 302 ms
59,020 KB |
testcase_59 | AC | 304 ms
59,744 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } } }