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

你还是再自己查自己的错吧

Posted by hawk at 2004-07-26 21:35:18 on Problem 1710
In Reply To:spj没问题吧,为什么WA阿 Posted by:PC0400322032 at 2004-07-26 21:33:09
给你看了一下,第一组数据就错了,肉眼就能看出来
> #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:
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