結果

問題 No.2619 Sorted Nim
ユーザー zawakasuzawakasu
提出日時 2024-01-26 22:24:48
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 901 bytes
コンパイル時間 2,407 ms
コンパイル使用メモリ 203,576 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-26 22:24:55
合計ジャッジ時間 5,707 ms
ジャッジサーバーID
(参考情報)
judge12 / 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 21 ms
6,676 KB
testcase_06 AC 25 ms
6,676 KB
testcase_07 WA -
testcase_08 AC 25 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 23 ms
6,676 KB
testcase_11 WA -
testcase_12 AC 23 ms
6,676 KB
testcase_13 WA -
testcase_14 AC 24 ms
6,676 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 23 ms
6,676 KB
testcase_19 AC 19 ms
6,676 KB
testcase_20 AC 20 ms
6,676 KB
testcase_21 AC 25 ms
6,676 KB
testcase_22 AC 21 ms
6,676 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 24 ms
6,676 KB
testcase_26 WA -
testcase_27 AC 20 ms
6,676 KB
testcase_28 AC 25 ms
6,676 KB
testcase_29 WA -
testcase_30 AC 23 ms
6,676 KB
testcase_31 AC 2 ms
6,676 KB
testcase_32 WA -
testcase_33 AC 22 ms
6,676 KB
testcase_34 AC 21 ms
6,676 KB
testcase_35 AC 23 ms
6,676 KB
testcase_36 AC 24 ms
6,676 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 24 ms
6,676 KB
testcase_40 AC 21 ms
6,676 KB
testcase_41 WA -
testcase_42 AC 19 ms
6,676 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 22 ms
6,676 KB
testcase_47 WA -
testcase_48 AC 2 ms
6,676 KB
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 21 ms
6,676 KB
testcase_52 AC 2 ms
6,676 KB
testcase_53 AC 25 ms
6,676 KB
testcase_54 AC 22 ms
6,676 KB
testcase_55 WA -
testcase_56 WA -
testcase_57 AC 24 ms
6,676 KB
testcase_58 WA -
testcase_59 WA -
testcase_60 AC 21 ms
6,676 KB
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) {
        std::cout << (v == 0 ? "Second" : "First") << '\n';
    }
    else {
        std::cout << (v == 0 ? "First" : "Second") << '\n';
    }
}
0