#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN=203;
int h, w, x;
int bom[MAXN][MAXN];
void construct_network(int H, int W, int K) {
// std::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);
h=H; w=W; x=K;
for(int i=0; i<h; i++) {
for(int j=0; j<w; j++) {
int cur=i*w+j;
vector<int> aux;
for(int i2=0; i2<h; i2++) {
for(int j2=0; j2<w; j2++) {
if(abs(i-i2)+abs(j-j2)!=x) continue;
int viz=i2*w+j2;
aux.push_back(viz);
}
}
bom[i][j]=-1;
if(aux.empty()) continue;
int aux2=add_or(aux);
bom[i][j]=add_and({cur, aux2});
// printf("\nbom %d >> %d\n", cur, bom[i][j]);
for(auto cur : aux) printf("%d ", cur);
}
}
vector<int> final;
for(int i=0; i<h; i++) for(int j=0; j<w; j++) if(bom[i][j]!=-1) final.push_back(bom[i][j]);
add_or(final);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
380 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
268 ms |
1296 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |