poj 1299 Polar Explorer 水题

来源:互联网 发布:店面广告牌设计软件 编辑:程序博客网 时间:2024/04/27 18:05
//poj 1299//sep9#include <iostream>using namespace std;const double pi=3.14159;char s[32];int main(){while(scanf("%s",s)==1&&strcmp(s,"ENDOFINPUT")!=0){double x,y,z;scanf("%lf%lf%lf",&x,&y,&z);scanf("%*s");z=min(z,360-z);double d=z/90*pi*x;if(d/5<=y)printf("YES %d\n",int(y-d/5));elseprintf("NO %d\n",int(y*5));}return 0;} 

0 0
原创粉丝点击