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 ≤ 106) — length of the array.

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

Output

Output answer in single line. "First", if first player wins, and "Second" otherwise (without quotes).

Examples

Input
4
1 3 2 3
Output
First
Input
2
2 2
Output
Second

Note

In first sample first player remove whole array in one move and win.

In second sample first player can't make a move and lose.

 #include<stdio.h>
#include<map>
#include<iostream>
#include<string.h>
#include<algorithm>
#include<stack>
#include<cmath>
#include<vector>
using namespace std;
typedef long long ll; int a[]; int main()
{
int n;
while(cin>>n)
{
ll sum=;
int flag=;
for(int i=;i<n;i++)
{
cin>>a[i];
if(a[i]%==)
flag=;
sum+=a[i];
}
if(sum%==)
cout<<"First"<<endl;
else
{
if(flag==)
cout<<"Second"<<endl;
else
cout<<"First"<<endl;
} }
return ;
}

CodeForces - 841B-Godsend-思维的更多相关文章

  1. Codeforces 841B - Godsend

    题目链接:http://codeforces.com/problemset/problem/841/B Leha somehow found an array consisting of n inte ...

  2. CodeForces 604C 【思维水题】`

    题意: 给你01字符串的长度再给你一个串. 然后你可以在这个串中选择一个起点和一个终点使得这个连续区间内所有的位取反. 求: 经过处理后最多会得到多少次01变换. 例如:0101是4次,0001是2次 ...

  3. Minimum Integer CodeForces - 1101A (思维+公式)

    You are given qq queries in the following form: Given three integers lili, riri and didi, find minim ...

  4. Codeforces 1038D - Slime - [思维题][DP]

    题目链接:http://codeforces.com/problemset/problem/1038/D 题意: 给出 $n$ 个史莱姆,每个史莱姆有一个价值 $a[i]$,一个史莱姆可以吃掉相邻的史 ...

  5. AND Graph CodeForces - 987F(思维二进制dfs)

    题意:给出n(0≤n≤22)和m,和m个数ai,1 ≤ m ≤ 2n ,0≤ai<2n ,把ai & aj == 0 的连边,求最后有几个连通块 解析:一个一个去找肯定爆,那么就要转换一 ...

  6. CodeForces - 631C ——(思维题)

    Each month Blake gets the report containing main economic indicators of the company "Blake Tech ...

  7. Almost Acyclic Graph CodeForces - 915D (思维+拓扑排序判环)

    Almost Acyclic Graph CodeForces - 915D time limit per test 1 second memory limit per test 256 megaby ...

  8. Diagonal Walking v.2 CodeForces - 1036B (思维,贪心)

    Diagonal Walking v.2 CodeForces - 1036B Mikhail walks on a Cartesian plane. He starts at the point ( ...

  9. CodeForces - 1102A(思维题)

    https://vjudge.net/problem/2135388/origin Describe You are given an integer sequence 1,2,-,n. You ha ...

  10. Codeforces 135A-Replacement(思维)

    A. Replacement time limit per test 2 seconds memory limit per test 256 megabytes input standard inpu ...

随机推荐

  1. 重新认识Maven

    PS:第一次接触maven大约是两年前吧,隐约记得之前都是人工寻找并下载很多jar,放在项目的lib中(表示太年轻,没有接触过Ant或者其他类似的工具,就不找别人写的比较了).懒人永远有着自己的小聪明 ...

  2. Nginx负载均衡之TCP/UDP流

    负载均衡是指在多个后端服务器之间有效地分配网络流量. 从NGINX Plus R5[1] 版本开始可以代理和负载均衡传输控制协议(Transmission Control Protocol,TCP)通 ...

  3. 控制banner内容

    Spring Boot启动的时候默认的banner是spring的字样,看多了觉得挺单调的,Spring Boot为我们提供了自定义banner的功能. 自定义banner只需要在resource下新 ...

  4. upc组队赛14 Bus stop【签到水】

    Bus Stop 题目描述 In a rural village in Thailand, there is a long, straight, road with houses scattered ...

  5. shell 删除隐藏文件.svn

    参考:https://blog.csdn.net/zhangxinrun/article/details/6409125 echo "recursively removing .svn fo ...

  6. Python 2 将死,你准备好了吗?

    Python 软件基金会宣布,到 2020 年元旦,将不再为编程语言 Python 2.x 分支提供任何支持.这一天将标志着一出延续多年的戏剧的高潮:Python 从较旧的.功能较弱的.广泛使用的版本 ...

  7. HTML创建文本框的3种方式

    我的第一个随笔,记录主要用来整理学习的知识点 1.input 创建单行文本框 <input type="text" size="10" maxlength ...

  8. js常用算术运算符与一元运算符在做运算时不同类型的转换规则

    /** * 算术运算符:+, -, *, /, % * 当对非number类型的值进行运算(-, *, /, %)时,会将这些值先转换成number再运算,加法'+'运算除外, * 当对非number ...

  9. hashRouter and BrowserRouter

    <html><body> <div> <button class="btn" onclick="btnFun();"& ...

  10. 基于SSL实现MySQL的加密主从复制

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u012974916/article/details/53316758 大家都知道MySQL的主从复制 ...