Submission #592617

# Submission time Handle Problem Language Result Execution time Memory
592617 2022-07-09T11:03:11 Z lcj Vision Program (IOI19_vision) C++17
0 / 100
2 ms 1104 KB
#include <bits/stdc++.h>
#include "vision.h"
#define loc(i, j) i*W+j

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;

void construct_network(int H, int W, int K) {
	int cnt = 0;
	int base = H*W-1;
	vector<int> indires;
	for (int i = 0; i < H; i++)
	{
		for (int j = 0; j < W; j++)
		{
			vector<int> Ns;
			for (int s = -K; s <= K; s++)
			{
				int ni = i+s;
				int nj = j + K-abs(s);
				if (ni >= 0 && ni < H && nj >= 0 && nj < W) {
					Ns.push_back(ni*W+nj);
				}
				if (abs(s) == K) continue;
				nj = j - (K-abs(s));
				if (ni >= 0 && ni < H && nj >= 0 && nj < W) {
					Ns.push_back(ni*W+nj);
				}
			}
			if (Ns.empty()) {
				add_and({0, 1, 2});
			}
			else {
				add_or(Ns);
			}
			cnt++;
			add_and({base + cnt, i*W+j});
			cnt++;
			indires.push_back(cnt);
		}
	}
	add_or(indires);
	cnt++;
}
# 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 340 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), (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 -