Set Plate (2016 "Baidu Star"-Test race (warm-up, Chen's question))

Source: Internet
Author: User

Put the plates.accepts:79submissions:179Time 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.
Statistic | Submit | Clarifications | Back

At first thought of game theory. Look at the original only the comparison radius can ...

Because in C program can not do tan60°, so to use radians to denote degrees such as Tan60°=tan (pi*60/180)

#include <stdio.h> #include <math.h> #define PI 3.1415926int main () {int ncase;int t=1;scanf ("%d", &ncase ); while (ncase--) {double n,a,r,r,x;scanf ("%lf%lf%lf", &n,&a,&r); x= (180-(double) 360/n)/2; R=tan (pi*x/180) *a/2;printf ("Case #%d:\n", t++), if (r<r) printf ("I want to Kiss you!\n"); elseprintf ("Give Me a kiss!\n" );}}


Set Plate (2016 "Baidu Star"-Test race (warm-up, Chen's question))

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.