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 kric at 2007-03-16 21:09:42 on Problem 1547
In Reply To:呵呵,改了你的代码 Posted by:qiqilrq at 2007-02-06 12:23:20
> #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