| ||||||||||
| 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 | |||||||||
我改你的代码,哈哈!In Reply To:Re:这么简单的题目怎么会WA呢 :( Posted by:mjmj at 2004-11-25 16:36:37 #include <stdlib.h>
#include <iostream>
using namespace std;
char arr[15][30];
int main()
{
int n,j,i, t=1;
char strset[20][30];
while(cin>>n && n)
{
cout<<"SET "<<t++<<endl;
for(i=0;i<n;i++)
cin>>strset[i];
for(i=0; i<n; i+=2)
cout<<strset[i]<<endl;
for(i= ((n%2)==0 ? n-1 : n-2);i>=0; i-=2)
cout<<strset[i]<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator