답안 #149939

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149939 2019-09-01T07:25:50 Z Outfraware Boat People(#3577, c4big, bsyo2k, cepiloth) 함수컵 박물관 (FXCUP4_museum) C++17
컴파일 오류
0 ms 0 KB
#include <stdio.h>
#include <stdlib.h>
#include "museum.h"

static int N;
static std::vector<int> Badge, Tshirt, Gift;

static void my_assert(int TF, const char* message){
	if(!TF){ puts(message); exit(1); }
}

int main(){
	my_assert(scanf("%d", &N) == 1, "Error: Invalid Input");
	my_assert(2 <= N && N <= 200000, "Error: Invalid Input");

	for(int i=0; i<N; i++){
		int a;
		my_assert(scanf("%d", &a) == 1, "Error: Invalid Input");
		my_assert(1 <= a && a <= 100, "Error: Invalid Input");
		Badge.push_back(a);
	}
	for(int i=0; i<N; i++){
		int a;
		my_assert(scanf("%d", &a) == 1, "Error: Invalid Input");
		my_assert(1 <= a && a <= 100, "Error: Invalid Input");
		Tshirt.push_back(a);
	}
	for(int i=0; i<N; i++){
		int a;
		my_assert(scanf("%d", &a) == 1, "Error: Invalid Input");
		my_assert(1 <= a && a <= 100, "Error: Invalid Input");
		Gift.push_back(a);
	}

	printf("%lld\n", CountSimilarPairs(Badge, Tshirt, Gift));
	return 0;
}

Compilation message

/tmp/ccYQpKz2.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccDmuPab.o:museum.cpp:(.text.startup+0x0): first defined here
/tmp/ccDmuPab.o: In function `main':
museum.cpp:(.text.startup+0x201): undefined reference to `CountSimilarPairs(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
/tmp/ccYQpKz2.o: In function `main':
grader.cpp:(.text.startup+0x201): undefined reference to `CountSimilarPairs(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status