# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148707 | HSNU (#200) | HicCup (FXCUP4_hiccup) | C++17 | 21 ms | 4352 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<bits/stdc++.h>
#include "hiccup.h"
using namespace std;
int HicCup(string S)
{
int N = S.size();
stack<char> s;
for (char c : S)
if (s.empty())
s.push(c);
else if (s.top() == 'H' && c == 'C')
s.pop();
else
s.push(c);
return s.empty() - 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |