Submission #1014460

# Submission time Handle Problem Language Result Execution time Memory
1014460 2024-07-05T00:04:46 Z HappyCapybara Vision Program (IOI19_vision) C++17
14 / 100
7 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<W-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<W-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 + W-1});

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

	add_or({H*W + H + W + 1 + W, H*W + H + W + 1 + W + 2 + H});
}
# Verdict Execution time Memory Grader output
1 Correct 1 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 1 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 1 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 1 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 1 ms 348 KB Output is correct
2 Incorrect 1 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 1 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 7 ms 1116 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 3 ms 776 KB Output is correct
8 Correct 3 ms 860 KB Output is correct
9 Correct 5 ms 1112 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 -