poj2013

简单题

#include <cstdio>

#define maxn 20
#define maxl 30

int n;
char st[maxn][maxl];

int main()
{
    int t = 0;
    while (scanf("%d", &n), n)
    {
        t++;
        printf("SET %d\n", t);
        for (int i = 0; i < n; i++)
            scanf("%s", st[i]);
        for (int i = 0; i < n; i += 2)
            puts(st[i]);
        for (int i = n - 1 - (n & 1); i > 0; i -= 2)
            puts(st[i]);
    }
    return 0;
}
View Code

 

posted @ 2013-06-12 16:59  金海峰  阅读(227)  评论(0编辑  收藏  举报