Submission #296258

# Submission time Handle Problem Language Result Execution time Memory
296258 2020-09-10T12:47:54 Z theStaticMind Vision Program (IOI19_vision) C++14
0 / 100
1 ms 384 KB
#include <bits/stdc++.h>
#include "vision.h"
using namespace std;

int n, m, k;

void query(int q){
	int x = q / m;
	int y = q % m;

	vector<int> ret;

	for(int h = max(0, x - k); h < n && h < x + k; h++){
		int w = y - (k - abs(x - h));
		if(w >= 0)ret.push_back(h*m + w);
	}
/*	for(int h = 0; h < n; h++){
		int w = y + (k - abs(x - h));
		if(w >= y && w < m) ret.push_back(h*m + w);
	}*/
	if(ret.empty()) add_not(q);
	else add_or(ret);
}

void construct_network(int H, int W, int K) {
	n = H;
	m = W;
	k = K;

/*	for(int i = 0; i < n*m; i++) query(i);
	for(int i = n*m; i < 2*n*m; i++) add_and({i - n*m, i});
	vector<int> arr;
	for(int i = 2*n*m; i < 3*n*m; i++) arr.push_back(i);
	add_or(arr);*/
	query(0);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 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 0 ms 256 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -