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. ios专题 - 委托模式实现

    在ios中,委托模式非常常见,那委托模式是什么? 委托模式是把一个对象把请求给另一个对象处理. 下面见例子: #import <UIKit/UIKit.h> @protocol LQIPe ...

  2. CF Round#240题解

    第一次参加CF的比赛,MSK19.30,四个小时的时差真心累,第一次CODE到这么夜-- 一开始做了A,C两题,后来做B题的时候我体力和精神集中度就很低了,导致一直WA在4-- 今天起床后再刷B,终于 ...

  3. v4l2简介

    V4L是linux内核中关于视频设备的子系统,为linux下的视频驱动提供了统一的接口,使应用程序可以使用统一的API操作不同的视频设备,简化视频系统的开发与维护 V4L2相比与V4L有更好的扩展性和 ...

  4. OpenJudge/Poj 1631 Bridging signals

    1.链接地址: http://poj.org/problem?id=1631 http://bailian.openjudge.cn/practice/1631 2.题目: Bridging sign ...

  5. make makefile

    Gcc的编译流程预处理阶段: gcc –E hello.c –o hello.i编译阶段: gcc –S hello.i –o hello.s汇编阶段:gcc –c hello.s –o hello. ...

  6. web api 跨域请求,ajax跨域调用webapi

    1.跨域问题仅仅发生在Javascript发起AJAX调用,或者Silverlight发起服务调用时,其根本原因是因为浏览器对于这两种请求,所给予的权限是较低的,通常只允许调用本域中的资源,除非目标服 ...

  7. jsonp 使用示例

    客户端: <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head>< ...

  8. php版网易视频云api

    最近在做在线教育课程,使用网易云视频作为在线视频直播. 网易官方只有java示例,我们使用php,就自己写个api. 当然实现也是很简单的. 演示:http://www.deitui.com/inde ...

  9. Oracle课堂实验一“表的使用”代码。

    --创建本地管理表空间CustomerTBSCREATE TABLESPACE CustomerTBS         DATAFILE 'd:\Oracle11\product\11.2.0\ora ...

  10. python—cookielib模块对cookies的操作

    最近用python写爬虫爬了点数据,确实是很好用的东西,今天对python如何操作cookie进行一下总结. python内置有cookielib模块操作cookie,配合urllib模块就可以了很轻 ...