Submission #390501

# Submission time Handle Problem Language Result Execution time Memory
390501 2021-04-16T08:18:36 Z alireza_kaviani Ancient Books (IOI17_books) C++11
Compilation error
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