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

Re:水一下,水水更健康

Posted by TSERROF at 2012-09-10 15:04:02 on Problem 2070
In Reply To:水一下,水水更健康 Posted by:TSERROF at 2012-09-10 10:12:52
#include <cstdio>
int main()
{
	float speed;
	int weight,strength;
	while(scanf("%f%d%d",&speed,&weight,&strength)!=EOF && (speed!=0 || weight!=0 || strength!=0))
	{
		bool multiple=0;
		bool nopostion=1;
		if(speed<=4.5 && weight>=150 && strength>=200)
		{
			printf("Wide Receiver");
			multiple=1;
			nopostion=0;
		}
		if(speed<=6.0 && weight>=300 && strength>=500)
		{
			if(multiple)printf(" ");
			printf("Lineman");
			multiple=1;
			nopostion=0;
		}
		if(speed<=5.0 && weight>=200 && strength>=300)
		{
			if(multiple)printf(" ");
			printf("Quarterback");
			nopostion=0;
		}
		if(nopostion) printf("No positions");
		printf("\n");
	}
	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