A. Plate Gametime limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
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).
Sample test(s)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.
分析:
水題,一開始覺得挺麻煩的,但是如果自己認真分析一下就發現,只有兩種情況:
一,一個盤子都擺不下(題中第二個範例),則第二個人獲勝;
二,只要能放下盤子,則只要第一個人先把第一個盤子放到正中央,則接下來無論第二個人怎麼放盤子,第一個人都可以找到一個對稱的位置放下,所以這種情況第一個人一定能獲勝。
很簡單吧~~看來CodeForces確實偏重思維方面呐~~~第一次做CodeForces沒想到自己能想到這兒呵呵~
代碼:
#include <iostream>#include <cmath>using namespace std;const double pi=3.1415926;int main(){ int a,b,r; cin>>a>>b>>r; if ((2*r>a)||(2*r>b)) { cout<<"Second"<<endl; return 0; } cout<<"First"<<endl; return 0;}