結果

問題 No.2282 Boxed Nim
ユーザー shbgreeneryshbgreenery
提出日時 2023-04-29 08:56:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 780 bytes
コンパイル時間 1,643 ms
コンパイル使用メモリ 170,436 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-29 06:36:28
合計ジャッジ時間 2,703 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 23 ms
5,376 KB
testcase_10 AC 23 ms
5,376 KB
testcase_11 AC 22 ms
5,376 KB
testcase_12 AC 23 ms
5,376 KB
testcase_13 AC 23 ms
5,376 KB
testcase_14 AC 14 ms
5,376 KB
testcase_15 AC 14 ms
5,376 KB
testcase_16 AC 14 ms
5,376 KB
testcase_17 AC 14 ms
5,376 KB
testcase_18 AC 14 ms
5,376 KB
testcase_19 AC 17 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// #include "atcoder/all"
#include <bits/stdc++.h>
using ll = long long;
const int MOD1000000007 = 1000000007;
const int MOD998244353 = 998244353;
const double PI = 3.14159265358979323846264338327950288;

void solve();

int main()
{
    std::ios_base::sync_with_stdio(false);
    // std::cin.tie(0);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    solve();
    return 0;
}

void solve()
{
    int n;
    scanf("%d", &n);
    std::vector<int> a(n);
    int ans = 0;
    for (int i = 0; i < n; i++)
        scanf("%d", &a[i]);
    sort(a.begin(), a.end());
    int c = std::count(a.begin(), a.end(), 0);
    if (c % 2)
        printf("First\n");
    else
        printf("Second\n");
}
0