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 |
Re:spj没问题吧,为什么WA阿In Reply To:spj没问题吧,为什么WA阿 Posted by:PC0400322032 at 2004-07-26 21:33:09 呵呵,放心吧,这题的SPJ最多会把WA的判成AC^-^ > #include <stdio.h> > void main(void) > { > int n; > int i,j,k; > scanf("%d",&n); > k=2*n+1; > for(i=0;i<n;i++) > { > printf("%d ",k++); > for(j=0;j<i+1;j++) > printf("%d ",n*(n-i+j)-j); > printf("\n"); > } > for(i=n-1;i>2;i--) > { > printf("%d",k++); > for(j=0;j<i;j++) > printf(" %d",n*j + i - j); > printf("\n"); > } > printf("%d 2\n",k++); > printf("%d 1\n",k); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator