답안 #390501

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
390501 2021-04-16T08:18:36 Z alireza_kaviani 고대 책들 (IOI17_books) C++11
컴파일 오류
0 ms 0 KB
#include "books.h"

#include <cstdio>
#include <vector>
#include <cassert>

using namespace std;

int main() {
	int n, s;
	assert(2 == scanf("%d %d", &n, &s));

	vector<int> p((unsigned) n);
	for(int i = 0; i < n; i++)
		assert(1 == scanf("%d", &p[(unsigned) i]));

	long long res = minimum_walk(p, s);
	printf("%lld\n", res);

	return 0;
}

Compilation message

/tmp/ccgNlFtl.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccH7XfWK.o:books.cpp:(.text.startup+0x0): first defined here
/tmp/ccH7XfWK.o: In function `main':
books.cpp:(.text.startup+0x101): undefined reference to `minimum_walk(std::vector<int, std::allocator<int> >, int)'
/tmp/ccgNlFtl.o: In function `main':
grader.cpp:(.text.startup+0x211): undefined reference to `minimum_walk(std::vector<int, std::allocator<int> >, int)'
collect2: error: ld returned 1 exit status