Submission #151210

#TimeUsernameProblemLanguageResultExecution timeMemory
151210rdd6584HicCup (FXCUP4_hiccup)C++17
Compilation error
0 ms0 KiB
#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; }

Compilation message (stderr)

/tmp/ccVLwC09.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccM2wXHa.o:hiccup.cpp:(.text.startup+0x0): first defined here
/tmp/ccM2wXHa.o: In function `main':
hiccup.cpp:(.text.startup+0x11a): undefined reference to `HicCup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccVLwC09.o: In function `main':
grader.cpp:(.text.startup+0x11a): undefined reference to `HicCup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: error: ld returned 1 exit status