# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
150283 | | 오리버스부릉부릉 (#200) | HicCup (FXCUP4_hiccup) | C++17 | | 20 ms | 3328 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "hiccup.h"
#include <stack>
using namespace std;
int HicCup(std::string S) {
int N = S.size();
stack<int> sta;
for (int i = 0; i < N; i++) {
if (S[i] == 'H') {
sta.push(1);
}
else {
if (sta.empty()) return -1;
else sta.pop();
}
}
if (!sta.empty()) return -1;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |