zoj 1394 Polar Explorer
来源:互联网 发布:台服魔兽网络代理 编辑:程序博客网 时间:2024/04/30 12:33
Using this information along with how much gasoline is available for your planet-rover (which gets a measley 5 miles per gallon), you have to determine if you can possibly get to the crash site and back without running out of fuel.
注意题目所说的是来回车程,而且所给的角不一定就是车所走的路线对应的角。。还需判断若角度大于180度,则应该选择小于180的角走。。
#include<iostream>#include<string.h>using namespace std;#define PI 3.14159 int main(){int r,y,o,v=5;char s[10];float l;while(cin>>s){if(strcmp(s,"START")==NULL){cin>>r>>y>>o>>s;if(o>180)o=360-o;l=o*1.0/360*2*PI*r;if(v*y>=2*l)cout<<"YES "<<(int)(v*y-2*l)/v<<endl;elsecout<<"NO "<<v*y<<endl;}elseif(strcmp(s,"ENDOFINPUT")==NULL)break;}return 0;}
- ZOJ 1394 Polar Explorer
- zoj 1394 Polar Explorer
- ZOJ 1394 Polar Explorer
- zoj 1394 Polar Explorer
- ZOJ 1394 Polar Explorer
- ZOJ 1394 Polar Expoler
- 1299 Polar Explorer
- poj 1299 Polar Explorer 水题
- POJ 1299 Polar Explorer 笔记
- hnu acm Problem 10016 Polar Explorer
- polar-clock
- polar-clock
- 1394_Polar Explorer
- Explorer
- Explorer
- Polar坐标投影(C++)
- Polar码介绍
- matplotlib polar 雷达图
- ADO.NET的使用
- jquery (validate验证插件、form表单插件、cookie插件)
- 【远控编写09】客户端界面的设计和编写--为对话框添加入工具条
- PHP XDebug (Windows) 设置
- 使用Eclipse构建Maven的SpringMVC项目
- zoj 1394 Polar Explorer
- 温故知新--内连接、外连接、交叉连接
- JS 获取页面元素坐标
- MFC的消息處理函數
- js 页面获取坐标点
- Ubuntu下如何解压zip,tar,tar.gz,tar.bz2文件
- UFT Mobile – The Official HP Mobile Testing Solution
- zoj 1402 Magnificent Meatballs
- java applet 中的事件响应