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 19891215 at 2009-03-06 20:39:30 on Problem 2864
In Reply To:这样为什么过不了啊?题意我没理解没错吧!强人帮看一下啊!谢谢了 Posted by:22220000 at 2009-03-06 17:08:01
> #include<stdio.h>
> int main()
> {
> 	int n,d,m,i,j;
> 	int a[101][501];
> 	while(scanf("%d%d",&n,&d)!=EOF)
> 	{
> 		if(n==0&&d==0) break;
> 		for(i=0;i<d;i++)
> 			for(j=0;j<n;j++)
> 			scanf("%d",&a[i][j]);
> 		for(j=0;j<n;j++)
> 		{
> 			m=0;
> 			for(i=0;i<d;i++)
> 			if(a[i][j]==0)
> 			{
> 				m=1;
> 				break;	
> 			}	
> 			if(!m)
> 			{
> 				printf("yes\n");
> 				break;	
> 			}
> 		}
> 		if(m) printf("no\n");	
> 	}
> }

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