#include<bits/stdc++.h>
#include "hiccup.h"
using namespace std;
int HicCup(string S)
{
int N = S.size();
if (N % 2)
return -1;
for (int i = 0; i < N; i++)
if (i < N / 2 && S[i] == 'C')
return -1;
else if (i >= N / 2 && S[i] == 'H')
return -1;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
6 ms |
384 KB |
Output is correct |
3 |
Correct |
6 ms |
384 KB |
Output is correct |
4 |
Incorrect |
6 ms |
512 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
6 ms |
384 KB |
Output is correct |
3 |
Correct |
6 ms |
384 KB |
Output is correct |
4 |
Incorrect |
6 ms |
512 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |