Submission #1014459

# Submission time Handle Problem Language Result Execution time Memory
1014459 2024-07-04T23:49:29 Z HappyCapybara Vision Program (IOI19_vision) C++17
0 / 100
5 ms 1116 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;

void construct_network(int H, int W, int K){
	for (int i=0; i<H; i++){
		vector<int> v;
		for (int j=0; j<W; j++) v.push_back(i*W+j);
		add_or(v);
	}
	for (int j=0; j<W; j++){
		vector<int> v;
		for (int i=0; i<H; i++) v.push_back(i*W+j);
		add_or(v);
	}

	vector<int> v;
	for (int i=0; i<H; i++) v.push_back(H*W + i);
	add_xor(v);
	for (int j=0; j<H-1; j++) add_or({H*W + H + j, H*W + H + j + 1});
	v = {H*W + H + 0, H*W + H + W-1};
	for (int j=0; j<H-1; j++) v.push_back(H*W + H + W + 1 + j);
	add_xor(v);
	add_and({H*W + H + W, H*W + H + W + 1 + H-1});

	v = {};
	for (int j=0; j<W; j++) v.push_back(H*W + H + j);
	add_xor(v);
	for (int i=0; i<W-1; i++) add_or({H*W + i, H*W + i + 1});
	v = {H*W + 0, H*W + H-1};
	for (int i=0; i<W-1; i++) v.push_back(H*W + H + W + 1 + H + 2 + i);
	add_xor(v);
	add_and({H*W + H + W + 1 + H + 1, H*W + H + W + 1 + H + 2 + W-1});

	add_or({H*W + H + W + 1 + H, H*W + H + W + 1 + H + 2 + W});
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 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 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 1116 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 1 ms 348 KB on inputs (62, 5), (63, 5), expected 1, but computed 0
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -