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 |
请求指导#include<stdio.h> int p[1005][1005]; int main() { int n,i,j; int true=1; while(scanf("%d",&n)!=EOF){ if(n==0) break; for(i=0;i<n;i++) for(j=0;j<n;j++) scanf("%d",&p[i][j]); for(i=0;i<n-1;i++) { for(j=0;j<n-1;j++) if(p[i][j]+p[i+1][j+1]!=p[i+1][j]+p[i][j+1]) { true=0; break;} if(true==0) break;} if(true==1) printf("homogeneous\n"); else printf("not homogeneous\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