# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
148678 | | 갓띵건 (#200) | HicCup (FXCUP4_hiccup) | C++17 | | 21 ms | 3456 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;
int HicCup(string s) {
int n = s.size();
int h = 0;
for(int i = 0; i < n; i++) {
if(s[i] == 'H') h++;
if(s[i] == 'C') h--;
if(h < 0) return -1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |