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 smm595788087 at 2011-04-14 17:19:44 on Problem 2070
Source Code

Problem: 2070  User: smm595788087 
Memory: 220K  Time: 0MS 
Language: C++  Result: Accepted 

Source Code 
#include <iostream>
using namespace std;

int main(){
	//ifstream cin("aaa.txt");
	double speed ,weight , strength  ;
	
	while(cin>>speed>>weight>>strength){
		if(speed==0 && weight==0 && strength==0)	break;
		int tag=0;
		if(speed<=4.5 && weight>=150 && strength>=200)	tag += 1;
		if(speed<=5.0 && weight>=200 && strength>=300)	tag += 2;
		if(speed<=6.0 && weight>=300 && strength>=500)	tag += 4;
		
		switch(tag){
			case 0:cout<<"No positions"<<endl;
				break;
			case 1:cout<<"Wide Receiver"<<endl;
				break;
			case 2:cout<<"Quarterback"<<endl;
				break;
			case 4:cout<<"Lineman"<<endl;
				break;
			case 3:cout<<"Wide Receiver Quarterback"<<endl;
				break;
			case 6:cout<<"Lineman Quarterback"<<endl;
				break;
			case 7:cout<<"Wide Receiver Lineman Quarterback"<<endl;
				break;
		}
	}
	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