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

这陀题硬是一下子高不清楚做什么,贡献了2次WA

Posted by 1040769630 at 2011-07-29 17:23:17 on Problem 3224
#include<stdio.h>
main()
{
	int n,i,j,a[100][100],sum[100]={0},count=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		for(j=0;j<n;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<n;i++)
	{
		for(j=0;j<n;j++)
		{
		if(a[i][j]>a[j][i])
		sum[i]++;
		}
		if(i&&(sum[i]-sum[0]>0))
		{
		sum[0]=sum[i];
		count=i;
		}
	}
	printf("%d",count+1);
}

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