| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
这也太水了吧#include <iostream>
#include <string>
using namespace std;
const double PI = 3.14159;
int main() {
string fei;
while(1){
cin >> fei;
if(fei == "ENDOFINPUT") break;
int X,Y,Z;
cin >> X >> Y >> Z >> fei;
int jiao = (Z>180) ? (360-Z) : Z;
double dist = X * PI * jiao / 180.0;
dist *= 2;
if(dist > Y * 5){
cout << "NO " << Y*5 << endl;
}
else{
double fuel = Y - dist/5;
cout << "YES " << (int)fuel << endl;
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator