Turn the corner
Time Limit:1000MS Memory Limit:32768K
Total Submit:16 Accepted:9
Description
Mr. West bought a new car! So he is travelling around the city.
One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to has a width y. The car has a length l and a width d.
Can Mr. West go across the corner?
Input
Every line has four real numbers, x, y, l and w.
Proceed to the end of file.
Output
If he can go across the corner, print "yes". Print "no" otherwise.
Sample Input
10 6 13.5 4
10 6 14.5 4
Sample Output
yes
no
Hint
hdoj2438
有链接提示的题目请先去链接处提交程序,AC后提交到SDUTOJ中,以便查询存档。
Source
2008 Asia Harbin Regional Contest Online
最近一直在修炼三分技术。
顿然发现,所有三分似乎都与计算几何有关。。。好神奇的说。。。。
扯远了。。回到这个题目。
这个题目,我的写法和后来看到的标准写法不一样。
标准写法是去计算那个sita,而我的是。
我三分的是那个车与直角围城的三角心的一个底边长度
通过计算内拐点,到那条直线的最短距离来判断到底是不是输出yes或者no
详细见代码:
分享到:
相关推荐
HDOJ题目分类HDOJ题目分类HDOJ题目分类
ACM ICPC HDOJ1000
收集的部分HDOJ杭电ACM题的代码 大牛勿下 全是基础供初级acmer使用
HDOJ4515小Q系列故事——世界上最遥远的距离(日期问题)的AC源程序和它的完整输入输出数据。供大家参考和使用。
杭电acm解题报告 详细解析2000-2099 适合acm初学者
自己积累的部分杭电oj的(hdu)解题代码。。大家有空来看看。 基本上是自己写的哈。有错误之处请指教、
hdoj的一些题目分类,由hdu大牛搜集,希望对做ac的同志们有帮助
hdoj 2013 多校训练3标程+解题报告
ACM ICPC HDOJ1002
ACM ICPC HDOJ1001
hdoj1001标程
杭州电子科技大学hdoj1002,大整数相加问题
hdoj上的资源,代码有注释,很不错的哦
#include using namespace std; int main(){ char a[2]; while(cin>>a){ int temp; for(int i=0; i; i++) for(int j=0;j;j++) if(a[i]>a[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]=temp;...}
hdoj1004,解题代码,答案代码,欢迎下载
杭电oj4405,一道简单的概率dp题目
包括简单数学 组合数学 动态规划 贪心算法 母函数 搜索算法 组合博弈论 计算几何 等等
ACM ICPC HDOJ1003
ACM ICPC HDOJ1008
hdoj 2013 多校训练3标程+解题报告