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 qiqilrq at 2007-02-01 13:39:50 on Problem 2013
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:
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