結果

問題 No.2282 Boxed Nim
ユーザー wtf yup
提出日時 2024-11-29 21:20:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 1,085 bytes
コンパイル時間 1,631 ms
コンパイル使用メモリ 167,336 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-29 21:20:37
合計ジャッジ時間 3,129 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#include "debug.cpp"
#else
#define debug(...)
#define debugArr(...)
#endif
#define pb push_back
#define ar array
#define ll long long
#define ld long double
#define printvec(vec) {for(ll i=0;i<vec.size();i++) cout<<vec[i]<<" "; cout<<endl;}
#define sza(x) ((int)x.size())
#define all(a) (a).begin(), (a).end()
#define endl '\n'
const int MAX_N = 1e5 + 5;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
const ld EPS = 1e-9;
void solve() {
    int n; cin >> n;
    int ans = 1;
    for(int i=0;i<n;i++){
        int u;
        cin >> u;
        if(u==0){
            ans = ans^1;
        }
    }
    if(ans==0){
        cout << "First" << endl;
    }
    else{
        cout << "Second" << endl;
    }
}
void init_code(){
    ios_base::sync_with_stdio(NULL);
    cin.tie(NULL);
}
int main() {
    init_code();
    int tc = 1;
    // cin >> tc;
    for (int t = 1; t <= tc; t++) {
        // cout << "Case #" << t << ": ";
        solve();
    }
    cerr<<"Time: "<<1000*((double)clock())/(double)CLOCKS_PER_SEC<<" ms\n";
}
0