Description

Leha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two players play the game on the array. Players move one by one. The first player can choose for his move a subsegment of non-zero length with an odd sum of numbers and remove it from the array, after that the remaining parts are glued together into one array and the game continues. The second player can choose a subsegment of non-zero length with an even sum and remove it. Loses the one who can not make a move. Who will win if both play optimally?

Input

First line of input data contains single integer n (1 ≤ n ≤ 1000000) — length of the array.

Next line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 1000000000).

Output

Output answer in single line.

"First", if first player wins, and "Second" otherwise (without quotes).

Sample Input

4
1 3 2 3

Sample Output

First

题意:给你n个数,第一个人能删去一个连续的子串当且只当这个连续子串所有数之和为奇数,同理第二个人删的是和为偶数的子串,谁不能操作了谁输。考虑这个总串和为偶数的情况,因为为奇数的时候第一个人直接全删了。
   当总和为偶数的时候,如果所有的数都是偶数的话,第一个人就没有办法删了,所以第二个人赢,不然那第一个先删去一段子串,剩余的子串之和肯定为奇数。第二个人删去偶数,肯定不能全删了,剩余的肯定是奇数,
   那么第一个人必赢。综上,只有所有的数都是偶数的时候第二个人才赢,否则第一个人赢 。
#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <set>
using namespace std;
const int maxn=;
int n,x,temp;
string s;
int main()
{
cin>>n;
bool flag=false;
while(n--)
{
scanf("%d",&x);
if(x%)
flag=true;
}
if(flag==false)
cout<<"Second"<<endl;
else
cout<<"First"<<endl;
return ;
} /**********************************************************************
Problem: 2220
User: therang
Language: C++
Result: AC
Time:256 ms
Memory:2020 kb
**********************************************************************/

CSU 2018年12月月赛 H(2220): Godsend的更多相关文章

  1. CSU 2018年12月月赛 B 2214: Sequence Magic

    Description 有一个1到N的自然数序列1,2,3,...,N-1,N. 我们对它进行M次操作,每次操作将其中连续的一段区间 [Ai,Bi][Ai,Bi] (即第Ai个元素到第Bi个元素之间的 ...

  2. CSU 2018年12月月赛 G(2219): Coin

    Description 有这样一个众所周知的问题: 你面前有7个硬币,其中有一个劣质的(它比正常的硬币轻一点点),你有一个天平,问需要你需要使用天平多少次能保证找到那个劣质的硬币. 众所周知的算法是: ...

  3. CSU 2018年12月月赛 F(2218): Finding prime numbers

    Description xrdog has a number set. There are 95 numbers in this set. They all have something in com ...

  4. CSU 2018年12月月赛 D 2216 : Words Transformation

    Description There are n words, you have to turn them into plural form. If a singular noun ends with ...

  5. CSU 2018年12月月赛 A 2213: Physics Exam

    Description 高中物理老师总认为给学生文本形式的问题比给纯计算形式的问题要求更高.毕竟,学生首先得阅读和理解问题. 因此,他们描述一个问题不像”U=10V,I=5A,P=?”,而是”有一个含 ...

  6. 2018年12月8日广州.NET微软技术俱乐部活动总结

    吕毅写了一篇活动总结,写得很好!原文地址是:https://blog.walterlv.com/post/december-event-microsoft-technology-salon.html ...

  7. [2018-11-27]2018年12月1日宁波dotnet社区线下活动

    离上次活动,转眼又过了一个月,幸得各路大神支持,于本周六(12月1日),宁波dotnet社区的线下分享活动又来啦! 活动嘉宾及主题 董斌辉 2015-2019年微软全球最有价值专家(.NET方向) 2 ...

  8. CodePlus2017 12月月赛 div2可做题2

    11月的月赛错过了,来打12月月赛,由于很(zi)想(ji)拿(tai)衣(ruo)服(la),所以去打div2. T1是一个sb模拟,但是机房全卡死在这道语文题上了,基本上弄了一个半小时,T2可以秒 ...

  9. csu 10月 月赛 H 题 A Very Hard Problem

    Description CX老湿经常被人黑,被黑得多了,自己也就麻木了.于是经常听到有人黑他,他都会深情地说一句:禽兽啊! 一天CX老湿突发奇想,给大家出了一个难题,并且声称谁能够准确地回答出问题才能 ...

随机推荐

  1. asp.net mvc5 使用百度ueditor 本编辑器完整示例(下)配置上传播放视频

    通过 asp.net mvc5 使用百度ueditor 本编辑器完整示例(上)介绍,可以上传图片到服务器了,也可以上传小的视频文件,并且由百度编辑器自动加入html5<video>标签播放 ...

  2. CentOS7.5 -- Ansible部署与应用

    第1章 Ansible概述 Ansible是一个配置管理系统configuration management system python 语言是运维人员必须会的语言 ansible 是一个基于pyth ...

  3. LuoguP1948 电话线 【二分答案/图论】

    其实是和奥格瑞玛一样的题啦. 但还是想了很久后看了题解. 多年以后,笨笨长大了,成为了电话线布置师.由于地震使得某市的电话线全部损坏,笨笨是负责接到震中市的负责人.该市周围分布着N(1<=N&l ...

  4. Noip2014生活大爆炸版石头剪刀布【水模拟】

    模拟暴力也要优雅. https://www.luogu.org/problemnew/show/P1328 像我这种蒟蒻就会敲无数个ifelse qaq. 可以优雅地进行预处理一下. 膜法真是好东西q ...

  5. [USACO 2012 Jan Silver] Delivery Route【拆点】

    传送门:http://www.usaco.org/index.php?page=viewproblem2&cpid=106 这道题还真是完全没思路,真的不知道怎么做,但是看了题解后恍然大悟. ...

  6. magento CURD操作

    查询: $model = Mage::getModel('mynews/mynews'); $collection = $model->getCollection(); $collection- ...

  7. MyEclipse2014+Maven配置记录

    一.MyEclipse配置Maven 打开MyEclipse2014,选择菜单:Window --> Preferences,选择:MyEclipse-Maven4MyEclipse-Insta ...

  8. Spirng MVC +Velocity 表单绑定命令对象

    通常,表单中的数据在提交之后可以通过Spring MVC的@RequestParam注解在控制器函数的参数列表中中提取出来,但是一旦表单数据过多的话,参数列表将会变得非常长,最好的解决方案是将表单中的 ...

  9. Java用SAX解析XML

    要解析的XML文件:myClass.xml <?xml version="1.0" encoding="utf-8"?> <class> ...

  10. [ BZOJ 2038 ] Hose

    \(\\\) Description 给出一个数列,多次询问,每次给出一个区间 \([l_i,r_i]\) ,问在区间中随意选两个位置不同的数,是同一个数的概率有多大. \(n,m\le 5\time ...