Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这也太水了吧

Posted by KatrineYang at 2016-09-08 10:49:49 on Problem 1299
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator