Submission #734988

# Submission time Handle Problem Language Result Execution time Memory
734988 2023-05-03T10:45:44 Z MODDI Connecting Supertrees (IOI20_supertrees) C++14
Compilation error
0 ms 0 KB
#include "supertrees.h"
#include "grader.cpp"
#include <vector>
using namespace std;
int construct(std::vector<std::vector<int>> p) {
	int n = p.size();
	vector<vector<int> > answer;
	for(int i = 0; i < n; i++){
		vector<int> row;
		row.assign(0, n);
		if(i + 1 < n)
			row[i+1] = 1;
		if(i - 1 >= 0)
			row[i-1] = 1;
			
		answer.push_back(row);
	}
	
	build(answer);
	return 1;
}

Compilation message

/usr/bin/ld: /tmp/ccaApGYa.o: in function `build(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)':
grader.cpp:(.text+0x320): multiple definition of `build(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'; /tmp/cc3dam6a.o:supertrees.cpp:(.text+0x320): first defined here
/usr/bin/ld: /tmp/ccaApGYa.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc3dam6a.o:supertrees.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status