結果
| 問題 | 
                            No.1208 anti primenumber game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-08-30 17:55:05 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 390 bytes | 
| コンパイル時間 | 1,385 ms | 
| コンパイル使用メモリ | 168,344 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-15 14:43:12 | 
| 合計ジャッジ時間 | 3,019 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 34 WA * 10 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
    int N,M,B;cin>>N>>M>>B;
    if(B!=1){cout<<"First"<<endl;return 0;}
    vector<int>A(N);long long count=1-M,ans=0;bool a=true;
    for(int i=1;i<N;i++){
        cin>>A[i];
        if(A[i]==1)a=!a;
        if(a){count+=A[i]-1;ans+=1-M;}
        else{count+=1-M;ans+=A[i]-1;}
    }
    cout<<(count>ans? "First":"Second")<<endl;
}