A - Plate Game

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 abr (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.

题目大意就是有一个a*b的地方,在上面放半径为r的圆,要求圆两两不能相交(可以相切),也不能越出边界,两人轮流放,最后谁胜.

一开始并没有思路,就先去扛T2,T3了.后来T4一直WA,就回来想T1了.看了看大家的提交,代码长度都很短,我就纳闷了--------会不会是O(1)的?

后来想了一下,第一个操作的人如果可以放,他会放在哪里?应该是正中间.为什么?

因为先手放了一个正中间后,后手要么没地方放,要么有,但是先手也有,而且先手的操作与之对称,这样先手总是不会先面临不能放的局面.

所以,如果先手第一个放的下,那他就必胜了.

 #include<cstdio>
 using namespace std;
 int main(){
     int a,b,r; scanf("%d%d%d",&a,&b,&r);
     *r>a||*r>b) puts("Second"); else puts("First");
     ;
 }

[CodeForces - 197A] A - Plate Game的更多相关文章

  1. ACM: CodeForces 140A New Year Table-数学几何

    CodeForces 140A New Year Table Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d ...

  2. Codeforces Gym 100500F Problem F. Door Lock 二分

    Problem F. Door LockTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/at ...

  3. Codeforces Round #300(A.【字符串,多方法】,B.【思维题】,C.【贪心,数学】)

    A. Cutting Banner time limit per test:2 seconds memory limit per test:256 megabytes input:standard i ...

  4. Codeforces Round #300(Div. 2)-538A.str.substr 538B.不会 538C.不会 。。。

    A. Cutting Banner time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  5. Codeforces 1072 - A/B/C/D - (Done)

    链接:http://codeforces.com/contest/1072/ A - Golden Plate - [计算题] #include<bits/stdc++.h> using ...

  6. Codeforces gym 101343 A. On The Way to Lucky Plaza【概率+逆元+精度问题】

     2017 JUST Programming Contest 2.0 题目链接:http://codeforces.com/gym/101343/problem/A A. On The Way to ...

  7. Codeforces Round #517 (Div. 2, based on Technocup 2019 Elimination Round 2)

    Codeforces Round #517 (Div. 2, based on Technocup 2019 Elimination Round 2) #include <bits/stdc++ ...

  8. codeforces #516---ABC

    A---golden plate http://codeforces.com/contest/1072/problem/A 题意:给一个n*m的格子,从最外层往里涂色,每次尽量涂最外面的那一圈,两圈涂 ...

  9. Codeforces Round #300 A. Cutting Banner 水题

    A. Cutting Banner Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/538/pro ...

随机推荐

  1. 异步编程- async和await

    使用目的 避免阻塞主线程 提高程序响应能力 C#中使用 C# 中的 Async 和 Await 关键字是异步编程的核心. 疑惑 The async and await keywords don't c ...

  2. Codeforces Round #397 Div. 2 D. Artsem and Saunders

    http://codeforces.com/problemset/problem/765/D 题意: 有一个函数f,f: [n] → [n] 的意思就是定义域为[1,n],每个x值对应于[1,n]内的 ...

  3. springmvc后台接前端的参数,数组,集合,复杂对象等

    springmvc后台接前端的参数,数组,集合,复杂对象等 参考地址:https://blog.csdn.net/feicongcong/article/details/54705933  常用的几种 ...

  4. C# 委托例子

    两个子窗口向一个主窗口发送信息 主窗口: using System; using System.Collections.Generic; using System.ComponentModel; us ...

  5. hostname命令

    hostname命令用于显示和设置系统的主机名称.环境变量HOSTNAME也保存了当前的主机名.在使用hostname命令设置主机名后,系统并不会永久保存新的主机名,重新启动机器之后还是原来的主机名. ...

  6. 【Ruby】【改gem源镜像】【Win10 + Jruby-9.1.2.0 + Rails 5.1.3 + gem 2.6.4 】

    参考地址:https://ruby-china.org/topics/33843 (1)> gem sources --add http://gems.ruby-china.org 遇到问题: ...

  7. 总结react native 事件机制

    React 事件机制 一个组件的所有事件会使用统一的事件监听器,绑定到组件的最外层,那么如何使用? bind方法,绑定并且可以传递参数 <TouchableOpacity onPress={th ...

  8. 远程连接MySQL MySQL的远程连接

    在笔记本上安装了mysql, 想测试一下连接池对性能的影响,用了另一台PC来测试一段sql,出现以下错误: jdbc:mysql://10.201.11.128:3306/test Cannot cr ...

  9. JDBC连接数据库的安全性连接方法

    PreparedStatement ps=null; ResultSet rs=null; Connection ct=null; try { Class.forName("com.mysq ...

  10. ubuntu vscode chrome 显示color emoji

    win10 下vscode默认就可以显示color emoji, 真是亲儿子啊. 但linux下默认是显示黑白的. 绕了一些弯路之后,发现最简单的办法是: 1 下载google noto字体全集    ...