# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
149217 | (παρα)γεμιστά (#200) | HicCup (FXCUP4_hiccup) | C++17 | 1100 ms | 3448 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<bits/stdc++.h>
using namespace std;
char sec(stack<char> a){
int t = a.top();
a.pop();
int b = a.top();
a.push(t);
return b;
}
int HicCup(std::string s) {
stack<char> st;
for(int i=0;i<s.size();i++){
st.push(s[i]);
while(st.size()>=2 && st.top()=='C' && sec(st)=='H') st.pop(), st.pop();
}
if(st.size()!=0) return -1;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |