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 |
WHATs wrong?????????????????????????????????????????????????????????????????#include"stdio.h" long a[1002][1002],b[1002][1002],c[1002][1002],camp; main(){ int i,j,k,m,p,n,judge=0; scanf("%d%d%d",&m,&p,&n); for(i=1;i<=m;i++){ for(j=1;j<=p;j++){ scanf("%ld",&a[i][j]); } } for(i=1;i<=p;i++){ for(j=1;j<=n;j++){ scanf("%ld",&b[i][j]); } } for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ scanf("%ld",&c[i][j]); } } for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ camp=0; for(k=1;k<=p;k++){ camp+=a[i][k]*b[k][j]; } if(camp!=c[i][j]){ printf("No\n%d %d\n%ld\n",i,j,camp); return; } } } printf("yes\n"); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator