Submission #148696

#TimeUsernameProblemLanguageResultExecution timeMemory
148696갓띵건 (#200)HicCup (FXCUP4_hiccup)C++17
24 / 100
24 ms3328 KiB
#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; } if(h != 0) return -1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...