Put the plates.

Source: Internet
Author: User

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 row an integer t , which means t Group data. Each set of data contains 3 number Span class= "Katex" >n,a,r (4≤n≤100,0<a<1000,0<r<1000)

n is even, represents the number of sides of a polygon, a represents the edge length ofa positive polygon,R 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.

Code

This question I guess according to the sample, hint said that the small bear can first put a plate in the middle, and then according to the center of the polygon and the visitor's plate symmetrical play can win, so I guess the only way to win is that the first small bear will not be able to put the plate, That is, only regular polygon the inscribed circle radius is smaller than the plate radius of the small bear will lose, suddenly become a water problem ... But I do not know how to find regular polygon inscribed circle radius is still very headache, the formula is (the positive polygon inscribed circle RADIUS = Polygon side Length/2 * COT (PI/polygon Edge number)), but C + + does not have cot this function, I was through the cot (x) = Tan (PI/2-X) This equation of the operation Count

#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #define PI 3.141592654using namespace Std;int main () {int t;int a;double B, r;scanf ("%d", &t), for (int i = 1; I <= t; i++) {scanf ("%d%lf%lf", &a, &b, &r);p rintf ("Case #%d:\n", i); if ((b/2.0) * TAN (PI/2-pi/a) < R) {printf ("I want t O Kiss you!\n ");} else{printf ("Give me a Kiss!\n");} return 0;}

(The hot-season AK!)

Put the plates.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.