Submission #602737

# Submission time Handle Problem Language Result Execution time Memory
602737 2022-07-23T10:51:59 Z Clan328 Vision Program (IOI19_vision) C++17
0 / 100
2 ms 1104 KB
#include <bits/stdc++.h>

using namespace std;

#define pb push_back

int add_and(std::vector<int> Ns);

int add_or(std::vector<int> Ns);

int add_xor(std::vector<int> Ns);

int add_not(int N);

int transformCoords(int W, int i, int j) {
	return i*W+j;
}

bool isValid(int H, int W, int i, int j) {
	if (i < 0 || j < 0 || i >= H || j >= W) return false;
	return true;
}

void construct_network(int H, int W, int K) {
	vector<int> Ns;
	int idx = 0;
	for (int x = 0; x < H; x++) {
		for (int y = 0; y < W; y++) {
			for (int i = 0; i <= K; i++) {
				if (!isValid(H, W, i+x, K-i+y)) continue; 
				add_and({0, transformCoords(W, i+x, K-i+y)});
				Ns.pb(H*W+idx);
				idx++;
			}
		}
	}

	add_or(Ns); 
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 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 0 ms 212 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 0 ms 212 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 0 ms 212 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 1 ms 212 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 1 ms 212 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 2 ms 1104 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -