题目链接:https://vjudge.net/contest/397850#problem/B
题解:简单博弈题,后手赢,无论是否为1,都会交换先后手,但当输入大于1的时候,先手有两种选择,先手赢。
所以谁是后手,谁赢
代码:
#include<iostream>
#include<cstring>
#include<string>
#include<cstdio>
#include<algorithm>
#define maxn 100100
typedef long long int ll;
ll a;
using namespace std;
int main()
{
int t;
int n;
int f,s;
scanf("%d",&t);
while(t--)
{
bool fl=false;//无胜者
scanf("%d",&n);
int hou=2;//先后手问题
for(int i=0; i<n; i++)
{
cin>>a;
if(fl==false)
{
hou=3-hou;
if(a!=1)
fl=true;
}
}
if(hou==2)
cout<<"Second"<<endl;
else
cout<<"First"<<endl;
}
return 0;
}