백준10828

    [백준 10828번 - C++] 스택

    http://acmicpc.net/problem/10828 {코드} #include #include #include using namespace std; int main() { stack s; int n, tmp; string st; cin >> n; while (n--) { cin >> st; if (st == "push") { cin >> tmp; s.push(tmp); } else if (st == "top") { if (!s.empty()) { cout