POJ:1922 Ride to School
来源:互联网 发布:淘宝福利关键词2017 编辑:程序博客网 时间:2024/06/11 23:07
想通了就会发现这是一道大水题。
不管中间过程如何,Charley一定是最早到达的,而且是并列,所以只需要求里面出发时间非负最早到达的时间即可。
看了disscuss才知道。。。唉。
这个题还是说明思路要灵活,从另外的角度看问题。。
#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>using namespace std;int main(){ int N; while(scanf("%d",&N)&&N) { double v,t; double ans=9999999999; for(int i=0;i<N;++i) { scanf("%lf%lf",&v,&t); if(t<0) continue; double res=4.5/v*3600+t*1.0; ans=min(res,ans); } printf("%.0lf\n",ceil(ans)); } return 0;}
- POJ 1922 Ride to School
- POJ 1922 Ride to School
- POJ 1922 Ride to School
- poj 1922 Ride to School
- poj 1922 Ride to School
- POJ 1922 Ride to School
- POJ:1922 Ride to School
- POJ 1922 - Ride to School
- POJ 1922 Ride to School
- POJ 1922 Ride to School
- POJ-1922 Ride to School
- POJ 1922 Ride to School 解题报告
- Ride to School(POJ 1922)
- Ride to School - POJ 1922 水题
- POJ 1922:Ride to School:水题练java
- POJ 1922 Ride to School 简单模拟
- POJ——1922 Ride to School
- POJ 1922:Ride to School 【水】
- 远程分支和本地分支的相互创建和跟踪
- 如何手动清除Windows上Domino的安装信息
- java学习基础要点笔记
- 【虚拟化实战】Cluster设计之一资源池
- java数组基础
- POJ:1922 Ride to School
- Amazon桌面云(Workspaces)服务介绍
- 随机漫步模型及其实现
- 还是那句话低头做事,抬头做人
- oracle script: 重建索引
- CI_MODE polling的作用
- java des加密
- 2013-11-9 做的一次系统宕机诊断及总结
- spring 定时任务