結果
問題 | No.715 集合と二人ゲーム |
ユーザー | claw88 |
提出日時 | 2018-07-14 02:45:30 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 302 ms / 2,000 ms |
コード長 | 2,637 bytes |
コンパイル時間 | 1,121 ms |
コンパイル使用メモリ | 116,100 KB |
実行使用メモリ | 67,764 KB |
最終ジャッジ日時 | 2024-10-09 05:56:50 |
合計ジャッジ時間 | 8,551 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
26,100 KB |
testcase_01 | AC | 32 ms
22,328 KB |
testcase_02 | AC | 35 ms
24,984 KB |
testcase_03 | AC | 35 ms
23,088 KB |
testcase_04 | AC | 37 ms
24,888 KB |
testcase_05 | AC | 38 ms
24,980 KB |
testcase_06 | AC | 40 ms
27,532 KB |
testcase_07 | AC | 42 ms
25,728 KB |
testcase_08 | AC | 43 ms
25,260 KB |
testcase_09 | AC | 45 ms
26,032 KB |
testcase_10 | AC | 45 ms
25,856 KB |
testcase_11 | AC | 48 ms
26,008 KB |
testcase_12 | AC | 48 ms
23,784 KB |
testcase_13 | AC | 51 ms
26,088 KB |
testcase_14 | AC | 53 ms
28,520 KB |
testcase_15 | AC | 52 ms
28,436 KB |
testcase_16 | AC | 55 ms
26,376 KB |
testcase_17 | AC | 53 ms
26,288 KB |
testcase_18 | AC | 57 ms
29,044 KB |
testcase_19 | AC | 58 ms
31,096 KB |
testcase_20 | AC | 60 ms
31,536 KB |
testcase_21 | AC | 61 ms
29,404 KB |
testcase_22 | AC | 62 ms
31,072 KB |
testcase_23 | AC | 63 ms
28,736 KB |
testcase_24 | AC | 65 ms
29,852 KB |
testcase_25 | AC | 65 ms
29,572 KB |
testcase_26 | AC | 66 ms
29,680 KB |
testcase_27 | AC | 72 ms
32,308 KB |
testcase_28 | AC | 72 ms
30,280 KB |
testcase_29 | AC | 72 ms
32,188 KB |
testcase_30 | AC | 68 ms
30,068 KB |
testcase_31 | AC | 63 ms
28,900 KB |
testcase_32 | AC | 59 ms
31,444 KB |
testcase_33 | AC | 67 ms
31,452 KB |
testcase_34 | AC | 62 ms
31,672 KB |
testcase_35 | AC | 28 ms
26,132 KB |
testcase_36 | AC | 27 ms
23,956 KB |
testcase_37 | AC | 28 ms
23,960 KB |
testcase_38 | AC | 28 ms
26,104 KB |
testcase_39 | AC | 28 ms
24,240 KB |
testcase_40 | AC | 34 ms
26,484 KB |
testcase_41 | AC | 32 ms
24,476 KB |
testcase_42 | AC | 33 ms
24,432 KB |
testcase_43 | AC | 33 ms
24,468 KB |
testcase_44 | AC | 33 ms
24,432 KB |
testcase_45 | AC | 33 ms
24,572 KB |
testcase_46 | AC | 33 ms
24,468 KB |
testcase_47 | AC | 33 ms
26,608 KB |
testcase_48 | AC | 33 ms
26,600 KB |
testcase_49 | AC | 34 ms
24,624 KB |
testcase_50 | AC | 302 ms
67,764 KB |
testcase_51 | AC | 299 ms
65,656 KB |
testcase_52 | AC | 298 ms
65,104 KB |
testcase_53 | AC | 297 ms
64,184 KB |
testcase_54 | AC | 300 ms
67,004 KB |
testcase_55 | AC | 299 ms
67,560 KB |
testcase_56 | AC | 284 ms
65,184 KB |
testcase_57 | AC | 273 ms
65,732 KB |
testcase_58 | AC | 301 ms
65,380 KB |
testcase_59 | AC | 299 ms
63,516 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 (x < 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); } } }