# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
151210 | rdd6584 | HicCup (FXCUP4_hiccup) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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;
}