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 qiqilrq at 2007-02-06 12:23:20 on Problem 1547
In Reply To:看不出来,这也错了??郁闷!哥们帮个忙!!谢谢 Posted by:ACM05001_dz0302 at 2005-07-29 02:13:16
#include <stdio.h>
int main()
{
	int t,i,a,b,c,tmp;
	char n[10][20];
	while(scanf("%d",&t) && t>0)
	{
		int max = 0, min = 1000000000;
		int maxi, mini;
		for(i=1;i<=t;i++)
		{
			scanf("%d%d%d%s",&a,&b,&c,n[i]);
			tmp=a*b*c;
			if(tmp > max)
			{
				max = tmp;
				maxi = i;
			}
			if(tmp < min)
			{
				min = tmp;
				mini = i;
			}
		}
		printf("%s took clay from %s.\n",n[maxi],n[mini]);
	}
	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