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 luchang at 2011-07-18 15:56:21 on Problem 3224
#include<stdio.h>
main()
{
	int a[101][101],n,i,j,b[101],max,m;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		b[i]=0;
		
		for(j=0;j<n;j++)
	    {
		    scanf("%d",&a[i][j]);
		    if(a[i][j]==3)
		        b[i]++;
	    }
	}
	max=b[0];
		for(i=0;i<n-1;i++)
	{
		if(b[i+1]>b[i])
		{
			max=b[i+1];
			m=i+2;
		}
			
	}
	printf("%d",m);
	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