結果

問題 No.1208 anti primenumber game
ユーザー karinohitokarinohito
提出日時 2021-08-19 23:42:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 710 bytes
コンパイル時間 1,669 ms
コンパイル使用メモリ 164,220 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-21 03:12:16
合計ジャッジ時間 5,689 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 30 ms
5,376 KB
testcase_16 AC 32 ms
5,376 KB
testcase_17 AC 30 ms
5,376 KB
testcase_18 AC 30 ms
5,376 KB
testcase_19 AC 30 ms
5,376 KB
testcase_20 AC 30 ms
5,376 KB
testcase_21 AC 32 ms
5,376 KB
testcase_22 AC 31 ms
5,376 KB
testcase_23 AC 30 ms
5,376 KB
testcase_24 AC 100 ms
5,376 KB
testcase_25 AC 103 ms
5,376 KB
testcase_26 AC 100 ms
5,376 KB
testcase_27 AC 99 ms
5,376 KB
testcase_28 AC 97 ms
5,376 KB
testcase_29 AC 96 ms
5,376 KB
testcase_30 WA -
testcase_31 AC 30 ms
5,376 KB
testcase_32 AC 31 ms
5,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 24 ms
5,376 KB
testcase_37 AC 31 ms
5,376 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 97 ms
5,376 KB
testcase_41 AC 36 ms
5,376 KB
testcase_42 AC 36 ms
5,376 KB
testcase_43 WA -
testcase_44 AC 36 ms
5,376 KB
testcase_45 WA -
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(A) A.begin(),A.end()
using vll = vector<ll>;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
using Graph = vector<vector<ll>>;

ll gcd(ll(a), ll(b)) {
    ll c = a;
    while (a % b != 0) {
        c = a % b;
        a = b;
        b = c;
    }
    return b;
}

int main() {
    ll N,M;
    cin>>N>>M;
    vll A(N);
    rep(i,N)cin>>A[i];
    ll F=0;
    vll AN(2,0);
    rep(i,N){
        if(A[i]==1){
            AN[F]+=1;
            AN[F]-=M;
            F=1-F;
        }
        else{
            AN[F]+=A[i]-1;
            AN[1-F]+=(1-M);

        }
    }
    cout<<(AN[0]>AN[1]?"First":"Second")<<endl;

}
0