Submission #165792

# Submission time Handle Problem Language Result Execution time Memory
165792 2019-11-28T20:13:13 Z nikatamliani Vision Program (IOI19_vision) C++14
0 / 100
53 ms 5832 KB
# include "vision.h";
# include <bits/stdc++.h>
using namespace std;
int get(int H, int W, int K){
	vector < int > x[500], y[500], x1, y1, x2, y2, res;
	for(int i = 0; i < H; i ++){
		for(int j = 0; j < W; j ++){
			x[i + j].push_back(i * W + j);
			y[i - j + W - 1].push_back(i * W + j);
		}
	}
	for(int i = 0; i <= H + W - 2; i ++){
		x1.push_back(add_or(x[i]));
		y1.push_back(add_or(y[i]));
		x2.push_back(add_or(x1));
		y2.push_back(add_or(y1));
		if(i >= K){
			res.push_back(add_and({x1[i], x1[i - K]}));
			res.push_back(add_and({y1[i], y1[i - K]})); 
		}
	}
	return add_or(res);
}
void construct_network(int H, int W, int K){
	if(H + W - 2 > K){
		add_xor({get(H, W, K), get(H, W, K + 1)}); 
	} else{
		get(H, W, K);
	}
}

Compilation message

vision.cpp:1:21: warning: extra tokens at end of #include directive
 # include "vision.h";
                     ^
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 1144 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 53 ms 5832 KB on inputs (126, 120), (176, 169), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -