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. bzoj3351:[ioi2009]Regions

    思路:首先如果颜色相同直接利用以前的答案即可,可以离线排序或是在线hash,然后考虑怎么快速统计答案. 首先如果点a是点b的祖先,那么一定有点b在以点a为根的子树的dfs序区间内的,于是先搞出dfs序 ...

  2. bzoj4330:JSOI2012 爱之项链

    题目大意:一串项链由n个戒指组成,对于每个戒指,一共有M个点,R种颜色,且旋转后相同的戒指是相同的,然后一串项链又由N个戒指组成,同时要满足相邻的两个戒指不能相同,这串项链上某个位置插入了一个特殊的东 ...

  3. 理解Java中的前期绑定和后期绑定

    前期绑定,在程序执行前根据编译时类型绑定,调用开销较小,如C语言只有前期绑定这种方法调用. 后期绑定,是指在运行时根据对象的类型进行绑定,又叫动态绑定或运行时绑定.实现后期绑定,需要某种机制支持,以便 ...

  4. [Computer Vision] SIFT特征学习笔记

    SIFT(Scale Invariant Feature Transform),尺度空间不变特征,目前手工设计的最好vision特征. 以下是学习http://blog.csdn.net/zddblo ...

  5. ps -aux

    ~]# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.2 2900 852 ? Ss 11:49 ...

  6. HTTP协议-标签简介

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

  7. [DevExpress]DxValidationProvider分享

    前些日子从研究所临时调回公司,帮忙做另外一个项目的控件验证工作,其实内容非常的简单,就是将用户即将提交至服务器的数据先做一个本地验证,以达到减少服务器压力.提高用户体验的目的. 附上一张图片 这是官方 ...

  8. Linux自动备份MySQL数据库脚本代码

    下面这段Linux的Shell脚本用于每日自动备份MySQL数据库,可通过Linux的crontab每天定时执行 在脚本中可设置需要备份的数据库表清单,并且会将备份文件通过gzip压缩.需要注意的是, ...

  9. CentOS 6.4 使用YUM 安装MySQL5.5

    1.首先需要下载Yum的支持包: http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm 2.下载完成后将Yum库导入到你的 ...

  10. QQ空间的“神奇”图片

    近几天好多朋友问我qq空间出现的神奇图片原理,最近比较烦,事情比较多,一直没理.加上我对PHP之类的语言也一知半解. 今天闲了看了一下QQ空间,发现这个很早以前就有人写过这样的帖子了 看别人解释 (转 ...