# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148406 | Welcome to osu! (#200) | HicCup (FXCUP4_hiccup) | C++17 | 21 ms | 3352 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(std::string S)
{
int cnt = 0;
for(int i=0; i<S.size(); i++){
if(S[i]=='H') cnt++;
else cnt--;
if(cnt<0){
return -1;
}
}
if(cnt!=0) return -1;
else return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |