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
Input5 5 2
FirstInput
6 7 4Output
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 }
Plate Game CodeForces - 197A