Submission #38607


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <string>
#include <stack>
using namespace std;
signed main()
{
cin.tie(0), ios::sync_with_stdio(false);
stack<int> S;
string com;
int n;
while (cin >> com, com != "exit") {
if (com == "push")
cin >> n, S.push(n);
else if (com == "pop")
S.pop();
else
cout << S.top() << '\n';
}
}

ステータス

項目 データ
問題 0600 - プログラミング入門:Stack
ユーザー名 Mintows
投稿日時 2018-07-11 18:40:22
言語 C++11
状態 Accepted
得点 1
ソースコード長 421 Byte
最大実行時間 133 ms
最大メモリ使用量 4188 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 AC 26 ms 480 KB
1
Input02 AC 19 ms 444 KB
1
Input03 AC 21 ms 532 KB
1
Input04 AC 20 ms 480 KB
1
Input05 AC 24 ms 556 KB
1
Input06 AC 27 ms 736 KB
1
Input07 AC 34 ms 860 KB
1
Input08 AC 63 ms 1536 KB
1
Input09 AC 103 ms 2772 KB
1
Input10 AC 133 ms 4188 KB
1