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 qqhundun at 2009-08-25 15:23:41 on Problem 3740
感觉没有错啊,怎么一直WR,那位牛人帮帮忙,分析一下;
题意感觉不明朗阿,谁懂说一下。
#include<stdio.h>
int main()
{
  int i,j;
  int m,n;
  int a[20][350],b[350];
  while(scanf("%d%d",&m,&n)!=EOF)
  {
    for(i=0;i<n;i++)
		b[i]=0;
	for(i=0;i<m;i++)
	{
	  for(j=0;j<n;j++)
	  {
	    scanf("%d",&a[i][j]);
		if(a[i][j]==1)
			b[j]++;
	  }
	}
    for(j=0;j<n;j++)
	{	
		if(b[j]>1)
		{
			printf("It is impossible\n");
			break;
		}
	}
    if(j==n) printf("Yes, I found it\n");
  }
 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