time limit per test 2 seconds

memory limit per test 256 megabytes

input standard input

output standard output

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.

【翻译】输入一个长度为n的序列,第一个人和第二个人轮流操作,第一个人先操作。第一个人可以取走和为奇数的连续一段,第二个人可以取走和为偶数的连续一段,但是不能不去。两人采取最优策略,最终谁会赢(第一个赢输出Fires,反之输出Second)。

题解:
         ①分类讨论就可以了:
               (1)如果整个序列和为奇数,那么开局First就胜利了。

               (2)如果整个序列和为偶数:
                     [1]如果这个序列没有奇数,那么First没法取,Second赢了。

                     [2]如果存在奇数,那么必会有偶数个奇数,那么First每次只消去一个奇数,到最后一定是他赢,因为Second始终没法消去奇数个奇数。

#include<stdio.h>
int main()
{
int n,sum=0,_=0,a;scanf("%d",&n);
while(n--)scanf("%d",&a),sum+=a,a&1?_=1:1;
puts(sum&1||_?"First":"Second");return 0;
}//Paul_Guderian

祝母校60岁生日快乐!———Rice_Rabbit

最新文章

  1. Linux 脚本编写基础
  2. MATLAB 秒表函数 tic toc 计算程序运行时间
  3. java发布web项目
  4. SQO (标准查询运算符)方法 &amp; Linq To Object
  5. speed up your sharepoint
  6. 《学习opencv》笔记——矩阵和图像操作——cvSetIdentity,cvSolve,cvSplit,cvSub,cvSubS and cvSubRS
  7. 如何在Visio 2007中画接口和实现类的关系图
  8. JUnit之TestCase和TestSuite详解
  9. Transactional 事务
  10. Java web现在流行用什么框架?
  11. Lua:Nginx Lua环境配置,第一个Nginx Lua代码
  12. iOS - (集成支付宝第三方SDK大坑总结)
  13. SQL 检查 Varchar 是否能转换为 NUMERIC
  14. (C/C++学习笔记) 二十二. 标准模板库
  15. java synchronized 同步详解
  16. winSockets编程(四)阻塞模式(服务端)
  17. MongoDB简单使用 —— 驱动
  18. Ubuntu 18.10 安装PDF阅读器
  19. XPath高级用法(冰山一角)
  20. Java中泛型通配符的一点概念

热门文章

  1. Java分享笔记:FileOutputStream流的write方法
  2. ASPX页面请求响应过程
  3. bedtools
  4. 779. K-th Symbol in Grammar
  5. POJ3682 概率DP
  6. Wannafly挑战赛4. B
  7. 使用python制作神经网络——搭建框架
  8. POJ:2785-4 Values whose Sum is 0(双向搜索)
  9. java实时监听日志写入kafka(多目录)
  10. Idea中maven依赖图查看