| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
感觉没有错感觉没有错啊,怎么一直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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator