Submission #148766

# Submission time Handle Problem Language Result Execution time Memory
148766 2019-09-01T05:04:46 Z Dopatii(#3751, bogdan10bos, Gioto, Bodo171) HicCup (FXCUP4_hiccup) C++17
Compilation error
0 ms 0 KB
#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

/tmp/ccEdAwYu.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccSp1XXF.o:hiccup.cpp:(.text.startup+0x0): first defined here
/tmp/ccSp1XXF.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/ccEdAwYu.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