結果

問題 No.2619 Sorted Nim
ユーザー KKT89KKT89
提出日時 2024-01-27 14:50:04
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 818 bytes
コンパイル時間 2,920 ms
コンパイル使用メモリ 213,772 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-27 14:50:13
合計ジャッジ時間 7,683 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}
inline double time() {
    return static_cast<long double>(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count()) * 1e-9;
}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    ll cnt = 0;
    for (int i = 0; i < n;) {
        cnt += n-i;
        int c = a[i];
        while (i < n and c == a[i]) i += 1;
    }
    if (cnt%2 == 1) cout << "First" << endl;
    else cout << "Second" << endl;
}
0