# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
151209 | rdd6584 | HicCup (FXCUP4_hiccup) | C++17 | 0 ms | 0 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma warning(disable:4996)
#include "hiccup.h"
static char st[1000101]; static int len;
static void my_assert(int TF, const char* message){
if(!TF){ puts(message); exit(0); }
}
int main(){
my_assert(scanf("%s", st) == 1, "Error: Invalid Input");
len = strlen(st);
my_assert(1 <= len && len <= 1000000, "Error: Invalid Input");
for(int i=0; i<len; i++){
my_assert(st[i]=='H' || st[i]=='C' || st[i]=='!', "Error: Invalid Input");
}
std::string ss = st;
printf("%d\n", HicCup(ss));
return 0;
}