Put the plates.Time limit:2000/1000 MS (java/others)Memory limit:65536/65536 K (java/others) Problem Description
The cubs are fond of mischief. Today he presented a ESU game to the visitors. He and his visitors took turns to put plates in a regular polygon. The last dish is the winner, who will win a kiss from the loser. After playing two times, the Cubs found that the visitors were aware of the game's winning strategy. Now the little bear is always the initiator, and he wants to know if he can win.
Note that the plate cannot intersect or intersect the polygon and cannot be placed outside the polygon. In other words, the point inside the plate cannot be outside the polygon or inside the plate.
Input
First line an integer tt Said tt Group data. Each set of data contains 33 Numbern,a,r (4 \leq n \leq 100,0 < A < 1000,0 < R < $)N,a,R(4≤N≤100,0<a<1000,0<R<1000)
nn is even, representing the number of sides of the polygon, aa Represents the edge length of a positive polygon, Rr Represents the radius of the plate.
Output
For each set of data, first one line is output
Case #i:
The result is then output. If the small bear wins, output "Give me a kiss!" otherwise output "I want to Kiss you!"
Sample Input
24 50 2.54) 5.5 3
Sample Output
Case #1: Give me a kiss! Case #2: I want to kiss you! Hint in the first set of samples, the small Xiangxian placed a plate in the middle of the polygon, and then, regardless of how the visitor put it, the Cubs were able to win by symmetrically placing the polygon center with the visitor's plate.
Simple game, this hint gives is too obvious, as long as can put one in the middle, then the initiator definitely win, so we just need to judge can put a plate in the middle, that is to judge the center of the polygon to each side of the distance is greater than the radius of the plate.
#include <cstdio> #include <cstring> #include <cmath> #define PI 3.1415926#define EPS 1e-9int main () { int t,t=1;scanf ("%d", &t), while (t--) {int n;double a,r;scanf ("%d%lf%lf", &n,&a,&r);d ouble r = A/2/tan ( pi/n);//printf ("%lf", R), if (r-r >= EPS) printf ("Case #%d:\ngive me a kiss!\n", t++); else printf ("Case #%d:\ni want to K ISS you!\n ", t++);} return 0;}
Baidu Star 2015 qualifying game put the plate