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 |
【15】【25】WA是很正常的好么,字符串的结束符还要占一位,好好补补基础吧,付【15】【26】过的代码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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator