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

Re:这么简单的题目怎么会WA呢 :(

Posted by mjmj at 2004-11-25 16:36:37 on Problem 2013
In Reply To:这么简单的题目怎么会WA呢 :( Posted by:mjmj at 2004-11-25 16:35:23
#include <stdio.h>
#include <stdlib.h>
#include <iostream>

using namespace std;

char arr[15][30];

void main()
{
    int n;
    int n2;
    int i;
    int t=1;
    char temp[30];
    while(1)
    {
        cin>>n;
        if(n==0)
            break;
        cout<<"SET: "<<t++<<endl;
        n2=n/2;
        for(i=0;i<n2;i++)
        {
            cin>>temp;
            cout<<temp<<endl;
            cin>>arr[i];
        }
        if(n%2)
        {
            cin>>temp;
            cout<<temp<<endl;
        }
        for(i=n2-1;i>=0;i--)
            cout<<arr[i]<<endl;
    }
}



> 有没有奇怪点的测试数据?

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