Donghyeok Pizza
InterviewTime limit1sMemory limit128 MB
Given a circular table of radius r and a rectangular pizza w by l, decide whether the rectangle fits inside the circle.
- Level
Easy3 of 10
- Topics
- Geometry, Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
When the Daejeon ACM-ICPC Regional ends, all of the contestants go together to Donghyeok Pizza, a restaurant near KAIST. Because the contest runs for five hours, everyone is extremely hungry. To eat as quickly as possible, they want to order one large pizza. But if the pizza is too big, it might not fit on the table. The table is a circle and the pizza is a rectangle. Given the radius of the table and the size of the pizza, write a program that determines whether the pizza can be placed on the table.
Input
The input consists of several test cases. Each test case is given as three integers , , and . Here is the radius of the table, and and are the width and length of the pizza, respectively. (, ) When a line containing is given, the program terminates.
Output
For each test case, print on its own line whether the pizza can be placed on the table. For the -th test case (numbered starting from ), print Pizza i fits on the table. if the pizza fits, or Pizza i does not fit on the table. if it does not, where i is replaced by the actual test case number. A pizza whose corner touches the boundary of the table is considered to fit.