#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K)
{
/*
vector<int> Ns;
Ns = {0, 1};
int a = add_and(Ns);
Ns = {0, a};
int b = add_or(Ns);
Ns = {0, 1, b};
int c = add_xor(Ns);
add_not(c);
*/
for(int i = 0; i < H; ++i)
for(int j = 0; j < W; ++j)
add_and({i * W + j});
bool sk[303][303];
memset(sk, 0, sizeof(sk));
for(int i = 0; i < H; ++i)
for(int j = 0; j < W; ++j)
{
vector<int>vec;
for(int q = 0; q < H; ++q)
for(int z = 0; z < W; ++z)
if(abs(i - q) + abs(j - z) == K)
vec.push_back(q * W + z);
if(!vec.size())
add_and({i * W + j}), sk[i][j] = 1;
else
add_and(vec);
}
int p1 = H * W;
int p2 = H * W * 2;
for(int i = 0; i < H; ++i)
for(int j = 0; j < W; ++j)
if(!sk[i][j])
add_and({p1, p2}), ++p1, ++p2;
vector<int>s;
for(int i = H * W * 3; i < H * W * 4; ++i)
s.push_back(i);
add_or(s);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 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 |
4 ms |
1140 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
WA in grader: Invalid index |
3 |
Halted |
0 ms |
0 KB |
- |