#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
int dist (int x1, int y1, int x2, int y2) {
return abs(x2 - x1) + abs(y2 - y1);
}
void construct_network(int H, int W, int K) {
//add_and({0, add_not(0)}) = 0
//add_or({0, add_not(0)}) = 1
int op = 0;
vector <int> row, col;
for (int i = 0; i < H; i++){
vector <int> v;
for (int j = 0; j < W; j++){
v.push_back(i * W + j);
}
row.push_back(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);
}
col.push_back(add_or(v));
}
vector <int> rs;
vector <int> rdif, cdif;
for (int i = 0; i + K < H; i++){
rdif.push_back(add_and({row[i], row[i + K]}));
}
for (int i = 0; i + K < W; i++){
cdif.push_back(add_and({col[i], col[i + K]}));
}
add_or({add_and({add_xor(row), add_xor(cdif)}), add_and({add_xor(col), add_xor(rdif)})});
// add_xor({add_xor(row)})
}
Compilation message
vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:12:6: warning: unused variable 'op' [-Wunused-variable]
12 | int op = 0;
| ^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
WA in grader: Instruction with no inputs |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
1108 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
2 ms |
296 KB |
Output is correct |
4 |
Correct |
2 ms |
340 KB |
Output is correct |
5 |
Incorrect |
1 ms |
300 KB |
WA in grader: Instruction with no inputs |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |