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

为什么WA了。

Posted by happy__ting at 2010-06-10 18:33:27 on Problem 2070
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
char p[3][20]={"Wide Receiver","Lineman","Quaterback"};
int main()
{
	int f1,f2,f3,count=0;
	double a;
	int b,c;
	while(scanf("%lf%d%d",&a,&b,&c),a+b+c>0.0)
	{
		f1=0,f2=0,f3=0;
		if(a<=4.5&&b>=150&&c>=200)
			f1=1;
		if(a<=5.0&&b>=200&&c>=300)
			f3=1;
		if(a<=6.0&&b>=300&&c>=500)
			f2=1;
		if(f1&&f2&&f3)
			printf("%s %s %s\n",p[0],p[1],p[2]);
		else if(f1&&f2)
			printf("%s %s\n",p[0],p[1]);
		else if(f2&&f3)
			printf("%s %s\n",p[1],p[2]);
		else if(f1&&f3)
			printf("%s %s\n",p[0],p[2]);
		else if(f1)
			printf("%s\n",p[0]);
		else if(f2)
			printf("%s\n",p[1]);
		else if(f3)
			printf("%s\n",p[2]);
		else
			printf("No positions\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