結果

問題 No.715 集合と二人ゲーム
ユーザー noisy_noiminnoisy_noimin
提出日時 2018-07-13 23:20:25
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 852 bytes
コンパイル時間 1,421 ms
コンパイル使用メモリ 160,388 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-17 11:34:01
合計ジャッジ時間 4,307 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 3 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 4 ms
5,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 5 ms
5,376 KB
testcase_12 AC 6 ms
5,376 KB
testcase_13 WA -
testcase_14 AC 7 ms
5,376 KB
testcase_15 AC 6 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 8 ms
5,376 KB
testcase_19 AC 8 ms
5,376 KB
testcase_20 AC 8 ms
5,376 KB
testcase_21 WA -
testcase_22 AC 9 ms
5,376 KB
testcase_23 AC 9 ms
5,376 KB
testcase_24 AC 10 ms
5,376 KB
testcase_25 WA -
testcase_26 AC 10 ms
5,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 12 ms
5,376 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 9 ms
5,376 KB
testcase_33 WA -
testcase_34 AC 9 ms
5,376 KB
testcase_35 AC 1 ms
5,376 KB
testcase_36 AC 1 ms
5,376 KB
testcase_37 AC 1 ms
5,376 KB
testcase_38 AC 2 ms
5,376 KB
testcase_39 WA -
testcase_40 AC 2 ms
5,376 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 2 ms
5,376 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 2 ms
5,376 KB
testcase_50 WA -
testcase_51 AC 61 ms
5,376 KB
testcase_52 AC 60 ms
5,376 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 60 ms
5,376 KB
testcase_56 WA -
testcase_57 AC 54 ms
5,376 KB
testcase_58 WA -
testcase_59 AC 61 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(n) for(int i=0;i<n;i++)
#define repp(j, n) for(int j=0;j<n;j++)
#define reppp(i, m, n) for(int i=m;i<n;i++)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define debug(x) cerr << #x << ": " << x << endl

using namespace std;

typedef long long ll;
typedef pair<ll, ll> Pll;
typedef pair<int, int> Pii;

const ll MOD = 1000000007;
const long double EPS = 10e-10;

int main(){
    std::ios::sync_with_stdio(0); cin.tie(0);
    int n;
    cin >> n;
    int a[n];
    rep(n) cin >> a[i];
    sort(a, a+n);
    int groups = 0, i = 1, start = 0;
    while(i < n){
        if(a[i] - a[i-1] > 1){
            groups += (i-1 - start + 1) % 2;
            start = i;
        }
        i++;
    }
    if(start != n) groups += (n-1 - start + 1) % 2;
    cout << (groups%2?"First":"Second") << endl;
}
0