# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
149217 | 2019-09-01T05:59:34 Z | (παρα)γεμιστά(#3619, cfalas, ctziapo, Charis02) | HicCup (FXCUP4_hiccup) | C++17 | 1000 ms | 3448 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 384 KB | Output is correct |
2 | Correct | 6 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 12 ms | 512 KB | Output is correct |
5 | Correct | 171 ms | 3392 KB | Output is correct |
6 | Correct | 712 ms | 3352 KB | Output is correct |
7 | Correct | 977 ms | 3328 KB | Output is correct |
8 | Correct | 163 ms | 3328 KB | Output is correct |
9 | Correct | 252 ms | 3328 KB | Output is correct |
10 | Correct | 628 ms | 3328 KB | Output is correct |
11 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 384 KB | Output is correct |
2 | Correct | 6 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 12 ms | 512 KB | Output is correct |
5 | Correct | 171 ms | 3392 KB | Output is correct |
6 | Correct | 712 ms | 3352 KB | Output is correct |
7 | Correct | 977 ms | 3328 KB | Output is correct |
8 | Correct | 163 ms | 3328 KB | Output is correct |
9 | Correct | 252 ms | 3328 KB | Output is correct |
10 | Correct | 628 ms | 3328 KB | Output is correct |
11 | Execution timed out | 1100 ms | 3448 KB | Time limit exceeded |
12 | Halted | 0 ms | 0 KB | - |