题目:

    两支地区ACM比赛的队伍决定为了国际决赛而在一起集训. 他们约定在某天的 X 时到 Y 时的某一时刻相会. 但由于他们很少按时到 (有的队伍比赛那天都会迟到),
他们没有设定一个确切的相遇时间. 然而, 它们约定先到的队伍要等待 Z 分钟(经过计算,他们认为如果过了这么久还没等到那么极有可能另一支队不会来了).
假如两支队都会在X 到Y 点的某一时刻出现 (不一定整点,整分,可以是任意时刻), 计算他们能够相会的概率.

输入:

    两个整数X,Y(0<=X<Y<=24),一个实数Z( 0 < Z <= 60*(Y-X) ).

输出:

   一个实数,保留8位小数

Sample Input

11 12 20.0

Sample Output

0.5555556

           简单的几何概型

代码:
#include<cstdio>
double x,y,z,dist;
int main(){
scanf("%lf%lf%lf",&x,&y,&z);
z=z/60;
dist=y-x;
printf("%.8lf\n",(dist-z)/dist*z/dist*2+z*z/dist/dist );
}

  

 

SGU 144.Meeting的更多相关文章

  1. SGU 144. Meeting 概率dp 几何概率分布 难度:0

    144. Meeting time limit per test: 0.25 sec. memory limit per test: 4096 KB Two of the three members ...

  2. SGU 分类

    http://acm.sgu.ru/problemset.php?contest=0&volume=1 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traff ...

  3. SGU 乱乱开

    本解题报告 乱抄,乱写,随性随心,不喜多喷! SGU 142: 思路:一个string的字串不会超过2^20个,我们枚举出来就好了. 我出错点:数组RE #include<stdio.h> ...

  4. SGU Volume 1

    SGU 解题报告(持续更新中...Ctrl+A可看题目类型): SGU101.Domino(多米诺骨牌)------------★★★type:图 SGU102.Coprimes(互质的数) SGU1 ...

  5. Scrum Meeting Beta - 7

    Scrum Meeting Beta - 7 NewTeam 2017/12/6 地点:新主楼F座二楼 任务反馈 团队成员 完成任务 计划任务 安万贺 修复离线状态下启动时的bugIssue #150 ...

  6. Scrum Meeting Beta - 6

    Scrum Meeting Beta - 6 NewTeam 2017/12/5 地点:主南201 任务反馈 团队成员 完成任务 计划任务 安万贺 完成了离线状态本地存储的读取Issue #133Pu ...

  7. Scrum Meeting Beta - 5

    Scrum Meeting Beta - 5 NewTeam 2017/12/4 地点:主楼2楼走廊 任务反馈 团队成员 完成任务 计划任务 安万贺 完成了离线状态进入app的功能 实现离线状态读取本 ...

  8. [LeetCode] Best Meeting Point 最佳开会地点

    A group of two or more people wants to meet and minimize the total travel distance. You are given a ...

  9. [LeetCode] Meeting Rooms II 会议室之二

    Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si ...

随机推荐

  1. json串的使用

    一:在C#中使用json字符串 从这里下载:http://www.newtonsoft.com/products/json/ 安装: 1.解压下载文件,得到Newtonsoft.Json.dll 2. ...

  2. Delhi 安装ocx的方法

    Delhi 安装ocx的方法 1.通过cmd注册 2.通过delphi 注册 然后 可以修改 classnames  改成__tlb.pas单元中的控件的名称,就可以了 例如下图:

  3. HDU-1969 Pie

    http://acm.hdu.edu.cn/showproblem.php?pid=1969 Pie Time Limit: 5000/1000 MS (Java/Others)    Memory ...

  4. [PHP] 跳转以及回到原来的地址

    回到原来的地址: 1.PHP(PHP代码) Header('Location:'.$_SERVER["HTTP_REFERER"]); 2.JavaScript(相当于后退按钮,- ...

  5. Different Ways to Add Parentheses——Leetcode

    Given a string of numbers and operators, return all possible results from computing all the differen ...

  6. Add external tool in the Android Studio

    Add external tool in the Android Studio */--> pre { background-color: #2f4f4f;line-height: 1.6; F ...

  7. dubbo 运行过程

    Overview Architecture Provider: 暴露服务的服务提供方. Consumer: 调用远程服务的服务消费方. Registry: 服务注册与发现的注册中心. Monitor: ...

  8. winform 解决界面闪动、提升加载速度 分类: WinForm 2015-02-03 16:34 161人阅读 评论(0) 收藏

    说明: 从一个技术交流群里获得,经验证效果不错. //作用 加快界面加载 protected override CreateParams CreateParams          {         ...

  9. 【设计模式 - 7】之过滤器模式(Filter)

    1      模式简介 过滤器模式(Filter)也叫标准模式(Criteria),这种模式允许开发人员使用不同的标准来过滤一组对象,通过逻辑运算以解耦的方式把它们连接起来. 2      实例 需求 ...

  10. enum类型被intent所携带时需要注意的地方

    一般我们在Activity之间传递对象时多用Parcelable.比如写一个class,在这个class上标明implements Parcelable并实现接口就可以用Intent.putExtra ...