Submission #421383

# Submission time Handle Problem Language Result Execution time Memory
421383 2021-06-09T06:12:22 Z Dan4Life Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#include "vision.h"
#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
	set<pair<int,int> > S; S.clear();
	vector<int> v; v.clear();
	for(int i = 0; i < H; i++)
	{
		for(int j = 0; j < W; j++)
		{
			if(i+j==0)continue;
			//for(int k = i; k < H; k++)
			//{
			//	for(int l = 0; l < W; l++)
			//	{
					vector<int> Ns; Ns.clear();
					Ns = {i*W+j, 0};
					if(abs(i-0)+abs(j-0)!=K or S.count({i*W+j, 0})) continue;
					S.insert({i*W+j, 0});
					S.insert({0, i*W+j});
					int x = add_and(Ns); v.push_back(x);
			//	}
			//}
		}
	}
	add_or(v);
}

Compilation message

/usr/bin/ld: /tmp/cconyFzm.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccWvf4yj.o:vision.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cconyFzm.o: in function `add_and(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x150): multiple definition of `add_and(std::vector<int, std::allocator<int> >)'; /tmp/ccWvf4yj.o:vision.cpp:(.text+0x320): first defined here
/usr/bin/ld: /tmp/cconyFzm.o: in function `add_or(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x170): multiple definition of `add_or(std::vector<int, std::allocator<int> >)'; /tmp/ccWvf4yj.o:vision.cpp:(.text+0x340): first defined here
/usr/bin/ld: /tmp/cconyFzm.o: in function `add_xor(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x190): multiple definition of `add_xor(std::vector<int, std::allocator<int> >)'; /tmp/ccWvf4yj.o:vision.cpp:(.text+0x360): first defined here
/usr/bin/ld: /tmp/cconyFzm.o: in function `add_not(int)':
grader.cpp:(.text+0x1b0): multiple definition of `add_not(int)'; /tmp/ccWvf4yj.o:vision.cpp:(.text+0x380): first defined here
collect2: error: ld returned 1 exit status