解法:由于第一个人是可以选择任意长度,和为奇数的序列,偶数相对于奇数是可以忽略的,所以当第一个人有奇数个奇数的时候,一次就能取完,必赢。有大于等于2的偶数个的时候,取掉一个变为奇数,第二个人无可奈何,所以也必定为第一个人赢。唯一第一个人会输的就是没有奇数的时候了。
代码如下:
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<utility>
#include<stack>
#include<algorithm>
#include<cstring>
#include<string>
#include<cmath>
#include<set>
#include<map>
using namespace std;
const int maxn = 1e6 + 5;
int n;
int a[maxn];
long long sum = 0;
int main() {
#ifndef ONLINE_JUDGE
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
#endif
cin >> n;
int odd = 0;
for(int i = 0; i < n; i++) {
scanf("%d", &a[i]);
sum += a[i];
if(a[i] % 2 == 1)
odd++;
}
int ans = 0;
if(odd < 1) {
ans = 2;
} else {
ans = 1;
}
if(ans == 1)
cout << "First" << '\n';
else
cout << "Second" << '\n';
return 0;
}