Plate Game CodeForces - 197A

You've got a rectangular table with length a and width b and the infinite number of plates of radius r. Two players play the following game: they take turns to put the plates on the table so that the plates don't lie on each other (but they can touch each other), and so that any point on any plate is located within the table's border. During the game one cannot move the plates that already lie on the table. The player who cannot make another move loses. Determine which player wins, the one who moves first or the one who moves second, provided that both players play optimally well.

Input

A single line contains three space-separated integers a, b, r (1 ≤ a, b, r ≤ 100) — the table sides and the plates' radius, correspondingly.

Output

If wins the player who moves first, print "First" (without the quotes). Otherwise print "Second" (without the quotes).

Example

Input
5 5 2
Output
First
Input
6 7 4
Output
Second

Note

In the first sample the table has place for only one plate. The first player puts a plate on the table, the second player can't do that and loses.

 

In the second sample the table is so small that it doesn't have enough place even for one plate. So the first player loses without making a single move

 

 

题都看了好久,加上第一幅图把圆形画在边界上,再加上so that any point on any plate is located within the table's border,我是真的醉了。。。

题意:把圆盘放在桌子上,不要超出边界,谁先放不下就谁输。

第一个人开始放的下的话,就必放在桌子的几何中心上,那么由于对称性,周围的原盘必是偶数,所以放不下的时候恰恰该第二个人放,即第一个人必赢。。。

第一个人开始放不下的话,就该第二个人赢。。。

 1 #include<iostream>
 2 #include<algorithm>
 3 #include<cstdio>
 4 #include<cstring>
 5 #include<string>
 6 #include<cmath>
 7 using namespace std;
 8 typedef long long ll;
 9 
10 int main()
11 {   int a,b,r;
12     cin>>a>>b>>r;
13     if(a>=2*r&&b>=2*r) cout<<"First"<<endl;
14     else cout<<"Second"<<endl;
15 }

 

转载于:https://www.cnblogs.com/zgglj-com/p/7214825.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值