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

【15】【25】WA是很正常的好么,字符串的结束符还要占一位,好好补补基础吧,付【15】【26】过的代码

Posted by Belldandy at 2013-11-13 13:45:13 on Problem 2013
In Reply To:虽然很水,但是数据很变态,开【15】【25】WA了一次 后来改【30】【30】才过 Posted by:answerme11 at 2009-08-22 14:18:00
#include <stdio.h>

int main()
{
	int T=1,i=0,n;
	char data[15][26];
	while(scanf("%d\n",&n) && n)
	{
		for(i=0;i<n;++i)
		{
			gets(data[i]);
		}
		printf("SET %d\n",T++);
		for(i=0;i<n;i+=2)
		{
			puts(data[i]);
		}
		for(i=n-1-(n&1);i>=0;i-=2)
		{
			puts(data[i]);
		}
	}
}

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