原文:
http://blog.csdn.net/zzp441524586/article/details/7659825
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.
A single line contains three space-separated integers a, b, r (1 ≤ a, b, r ≤ 100) — the table sides and the plates' radius, correspondingly.
If wins the player who moves first, print "First" (without the quotes). Otherwise print "Second" (without the quotes).
5 5 2
First
6 7 4
Second
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.
![](https://i-blog.csdnimg.cn/blog_migrate/c8a56a3dc81ee3cc823992aa7ad3d1bb.png)
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.
![](https://i-blog.csdnimg.cn/blog_migrate/98d388549d7a9616ab3995f68306cfe8.png)
自己的代码:
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int a,b,r;
while(scanf("%d%d%d",&a,&b,&r)!=EOF)
{
puts((2*r>min(a,b))?"Second":"First");
}
return 0;
}