http://acm.hdu.edu.cn/status.php

Alfredo's Pizza Restaurant

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1732    Accepted Submission(s): 1023

Problem Description
Traditionally after the Local Contest, judges and contestants go to their favourite restaurant, Alfredos Pizza Restaurant. The contestants are really hungry after trying hard for five hours. To get their pizza as quickly as possible, they just decided to order one big pizza for all instead of several small ones. They wonder whether it is possible to put the big rectangular pizza on the surface of the round table such that it does not overhang the border of the table. Write a program that helps them!
 
Input
The input file contains several test cases. Each test case starts with an integer number r, the radius of the surface of the round table the contestants are sitting at. Input is terminated by r=0. Otherwise, 1 ≤ r ≤ 1000. Then follow 2 integer numbers w and l specifying the width and the length of the pizza, 1 ≤ w ≤ l ≤ 1000.
 
Output
Output for each test case whether the ordered pizza will fit on the table or not. Adhere to the format shown in the sample output. A pizza which just touches the border of the table without intersecting it is considered fitting on the table, see example 3 for clarification.
 
Sample Input
38 40 60 
 35 20 70
50 60 80 0
 
Sample Output
Pizza 1 fits on the table.
Pizza 2 does not fit on the table.
Pizza 3 fits on the table.
 #include<stdio.h>
int main()
{
int t=;
double r,w,l;
while(scanf("%lf",&r)&&r!=)
{
scanf("%lf%lf",&w,&l);
w=w/;
l=l/;
if(w*w+l*l<=r*r)
printf("Pizza %d fits on the table.\n",t++);
else
printf("Pizza %d does not fit on the table.\n",t++);
}
return ;
}
 

HDU-2368 Alfredo's Pizza Restaurant的更多相关文章

  1. hdu2368Alfredo's Pizza Restaurant

    Problem Description Traditionally after the Local Contest, judges and contestants go to their favour ...

  2. 转载:hdu 题目分类 (侵删)

    转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...

  3. 杭电ACM分类

    杭电ACM分类: 1001 整数求和 水题1002 C语言实验题——两个数比较 水题1003 1.2.3.4.5... 简单题1004 渊子赛马 排序+贪心的方法归并1005 Hero In Maze ...

  4. TZOJ 2289 Help Bob(状压DP)

    描述 Bob loves Pizza but is always out of money. One day he reads in the newspapers that his favorite ...

  5. HDU 4883 TIANKENG’s restaurant

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4883 解题报告:一家餐馆一天中有n波客人来吃饭,第 i 波  k 客人到达的时间是 s ,离开时的时间 ...

  6. HDU 1103 Flo's Restaurant(模拟+优先队列)

    Flo's Restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  7. TIANKENG’s restaurant HDU - 4883 (暴力)

    TIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to ...

  8. HDU 4883 TIANKENG’s restaurant Bestcoder 2-1(模拟)

    TIANKENG's restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/O ...

  9. HDU 4886 TIANKENG’s restaurant(Ⅱ) ( 暴力+hash )

    TIANKENG’s restaurant(Ⅱ) Time Limit: 16000/8000 MS (Java/Others)    Memory Limit: 130107/65536 K (Ja ...

随机推荐

  1. C#基础总复习03

    继续更新...接下来就是面向对象的知识了 1.面向对象:概念:使用面向对象的思想进行编程可以让的程序变得扩展性更高,便于维护: 我们在现实生活中去描述一个人的时候,通过描述这个人的特征和行为. 我们在 ...

  2. c++动态绑定与静态绑定

    C++为了支持多态性,采用了动态绑定和静态绑定 相关概念: 对象的静态类型:对象在声明时采用的类型,编译时确定 对象的动态类型:目前所指对象的类型,在运行时确定 class B { } class C ...

  3. 完整的 AJAX 写法(支持多浏览器)

    代码如下: <script type="text/javascript"> var xmlhttp; function Submit() { //1.创建 XMLHtt ...

  4. OpenCV2学习笔记01:Linux下OpenCV开发环境的搭建

    个人已经厌倦了Windows下的开发方式,于是决定转到Linux平台上来,当然我也知道这个转变会很艰辛,但是我还是要坚持.所以,后面的所有开发我都会基于Linux和Qt,先从开发环境的搭建开始做起,当 ...

  5. HTTP协议-标签简介

    这个系列的文章要讨论的是如何通过ASP.net服务器端技术来优化客户端缓存策略,而且让这种策略变得可配置和可扩展.我们要了解的知识从HTTP协议中相关属性对客户端缓存的影响,到ASP.NET如何控制这 ...

  6. CI的面向切面的普通权限验证

    第一步:开启CI的钩子配置,此次不多说看CI手册即可. 第二步:在cofig/hooks.php中进行钩子配置,CI手册中有记载 <?php defined('BASEPATH') OR exi ...

  7. 第 17 章 责任链模式【Chain of Responsibility Pattern】

    以下内容出自:<<24种设计模式介绍与6大设计原则>> 中国古代对妇女制定了“三从四德”的道德规范,“三从”是指“未嫁从父.既嫁从夫.夫死从子”,也就是说一个女性,在没有结婚的 ...

  8. UOJ179 线性规划

    Description 这是一道模板题. 本题中你需要求解一个标准型线性规划: 有\(n\)个实数变量\(x_1,x_2,\cdots,x_n\)和\(m\)条约束,其中第\(i\)条约束形如\(\s ...

  9. PHP 切割字符串 点号 不用双斜杠

    $name = "tupian.png"; $nameArr = explode(".", $name); 习惯了Java的程序员容易写成 $nameArr = ...

  10. 【HDU 3652】 B-number (数位DP)

    B-number Problem Description A wqb-number, or B-number for short, is a non-negative integer whose de ...