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 1987 at 2005-03-25 17:58:14 on Problem 1547
#include <iostream.h>//1547
void main()
{
	int a[9],b[9],c[9],e[9],f,g;
	int time=0,p;
	char d[9][9];
	while(time!=-1)
	{
		cin>>time;
		for(int i=0;i<time;i++)
		{
			cin>>a[i]>>b[i]>>c[i]>>d[i];
			e[i]=(a[i]+b[i]+c[i])/3;
		}
		p=0;
		for(i=0;i<time;i++)
			p+=e[i];
		p/=time;
		for(i=0;i<time;i++)
		{
			if(e[i]>p)
				f=i;
			if(e[i]<p)
				g=i;
		}
	cout<<d[f]<<" took clay from "<<d[g]<<"."<<endl;
	}
}


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