結果
| 問題 | No.1208 anti primenumber game |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2020-08-30 13:30:37 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 550 bytes |
| 記録 | |
| コンパイル時間 | 1,615 ms |
| コンパイル使用メモリ | 211,908 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-13 02:32:36 |
| 合計ジャッジ時間 | 3,378 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x+modulo))%modulo)
#define Inf 1000000000
int main(){
int N;
cin>>N;
long long M;
cin>>M;
vector<long long> A(N);
for(int i=0;i<N;i++)scanf("%lld",&A[i]);
vector<long long> p(2,0LL);
int now = 0;
int t = 0;
while(now!=N){
if(A[now]==1){
p[t] -= M;
p[t] ++;
now++;
}
else{
p[t] += A[now]-1;
A[now] = 1;
}
t^=1;
}
if(p[0]>p[1])cout<<"First"<<endl;
else cout<<"Second"<<endl;
return 0;
}
沙耶花