# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148394 | 2019-09-01T04:17:01 Z | Welcome to osu!(#3734, easrui, CodePlatina, jhwest2) | HicCup (FXCUP4_hiccup) | C++17 | 5 ms | 384 KB |
#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){ cout << -1; return 0; } } if(cnt!=0) cout << -1; else cout << 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |