poj 2013 Symmetric Order

1. 简单题，故意用了栈，另外从这个题上可以体会到OJ判题模式

#include <iostream>
#include <cstdio>
#include <stack>
using namespace std;

int main()
{
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
stack<string> st;
int i, j, n;
string str;
for (i = 1; ; i++)
{
cin >> n;
if (n == 0)
break;
cout << "SET " << i << endl;
for (j = 1; j <= n; j++)
{
cin >> str;
if (j % 2 == 1)
cout << str << endl;
else st.push(str);
}
while (!st.empty())
{
cout << st.top() << endl;
st.pop();
}
}
return 0;
}


POJ 2013 Symmetric Order（水~）

2015-08-26 16:23:19

[POJ] 2013 -> Symmetric Order

2015-04-21 20:32:08

POJ 2013 - Symmetric Order

2014-05-11 10:39:38

POJ 2013 Symmetric Order

2014-08-11 16:43:19

POJ 2013 Symmetric Order （水题）

2013-11-13 19:07:29

POJ 2013 Symmetric Order 水

2015-08-07 19:57:49

poj 2013 Symmetric Order 规律

2011-04-10 17:04:00

POJ 2013 Symmetric Order G++

2017-04-06 22:01:44

OpenJudge/Poj 2013 Symmetric Order

2014-12-04 13:06:13

【POJ】Symmetric Order

2017-02-28 01:21:51

不良信息举报

poj 2013 Symmetric Order