結果

問題 No.2619 Sorted Nim
ユーザー zawakasuzawakasu
提出日時 2024-01-26 22:26:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 921 bytes
コンパイル時間 2,176 ms
コンパイル使用メモリ 203,572 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-26 22:26:59
合計ジャッジ時間 5,808 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>




namespace zawa {

using i16 = std::int16_t;
using i32 = std::int32_t;
using i64 = std::int64_t;
using i128 = __int128_t;

using u8 = std::uint8_t;
using u16 = std::uint16_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;

using usize = std::size_t;

} // namespace zawa


namespace zawa {

void SetFastIO() {
    std::cin.tie(nullptr)->sync_with_stdio(false);
}

void SetPrecision(u32 dig) {
    std::cout << std::fixed << std::setprecision(dig);
}

} // namespace zawa
using namespace zawa;

int main() {
    SetFastIO();

    int n; std::cin >> n;
    std::vector<int> a(n);
    for (auto& x : a) std::cin >> x;
    int v{};
    for (int i{1} ; i < n ; i++) {
        v ^= a[i] - a[i - 1];
    }
    if ((n % 2 == 0) ^ (a[0] % 2 == 0)) {
        std::cout << (v == 0 ? "Second" : "First") << '\n';
    }
    else {
        std::cout << (v == 0 ? "First" : "Second") << '\n';
    }
}
0