結果

問題 No.1208 anti primenumber game
ユーザー 沙耶花沙耶花
提出日時 2020-08-30 13:30:37
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 550 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 202,588 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-27 06:56:26
合計ジャッジ時間 4,479 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#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;
}
0