Submission #590420

# Submission time Handle Problem Language Result Execution time Memory
590420 2022-07-05T23:04:29 Z farhan132 Sky Walking (IOI19_walk) C++17
Compilation error
0 ms 0 KB
#include "walk.h"
#include <cstdio>
#include <cassert>

using namespace std;

int main() {
	int n, m;
	assert(2 == scanf("%d%d", &n, &m));
	vector<int> x(n), h(n);
	for (int i = 0; i < n; i++)
		assert(2 == scanf("%d%d", &x[i], &h[i]));
	vector<int> l(m), r(m), y(m);
	for (int i = 0; i < m; i++)
		assert(3 == scanf("%d%d%d", &l[i], &r[i], &y[i]));
	int s, g;
	assert(2 == scanf("%d%d", &s, &g));
	fclose(stdin);

	long long result = min_distance(x, h, l, r, y, s, g);

	printf("%lld\n", result);
	fclose(stdout);
	return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccVJJbTH.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc5F7GcI.o:walk.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc5F7GcI.o: in function `main':
walk.cpp:(.text.startup+0x265): undefined reference to `min_distance(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int)'
/usr/bin/ld: /tmp/ccVJJbTH.o: in function `main':
grader.cpp:(.text.startup+0x395): undefined reference to `min_distance(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int)'
collect2: error: ld returned 1 exit status