結果

問題 No.2282 Boxed Nim
ユーザー shbgreeneryshbgreenery
提出日時 2023-04-29 08:51:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 812 bytes
コンパイル時間 1,440 ms
コンパイル使用メモリ 170,188 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-29 06:33:33
合計ジャッジ時間 2,955 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 WA -
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 22 ms
5,376 KB
testcase_10 AC 19 ms
5,376 KB
testcase_11 AC 20 ms
5,376 KB
testcase_12 AC 19 ms
5,376 KB
testcase_13 AC 20 ms
5,376 KB
testcase_14 AC 13 ms
5,376 KB
testcase_15 AC 12 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 16 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++)
    {
        // ans ^= 1;
        scanf("%d", &a[i]);
        ans ^= a[i];
    }
    ans = (ans > 0);
    sort(a.begin(), a.end());
    if (a[0] == 0)
        printf("First\n");
    else
        printf("Second\n");
}
0