結果

問題 No.1208 anti primenumber game
ユーザー t98slidert98slider
提出日時 2023-07-24 03:03:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 1,571 ms
コンパイル使用メモリ 169,080 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-25 05:45:18
合計ジャッジ時間 5,164 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    ll m, v = 0;
    cin >> n >> m;
    vector<ll> a(n);
    for(auto &&v : a) cin >> v;
    bool flag = false;
    int p = -1;
    for(int i = 0; i < n; i++){
        if(a[i] >= 2){
            p = i;
            break;
        }
    }
    if(p == -1){
        if(m == 0 && n % 2 == 1) flag = true;
    }else{
        if(p % 2 == 0) flag = true;
    }
    cout << (flag ? "First" : "Second") << '\n';
}
0