#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
void construct_network(int H, int W, int K){
vector<int> ow, xw, ad, oc, xc;
int f = -1, l = -1;
for(int i = H-1;i > 0;i--){
vector<int> o;
for(int j = i;j < H && j - i < W;j++){
o.push_back(j * W + j - i);
}
ow.push_back(add_or(o));
xw.push_back(add_xor(o));
}
for(int i = 0;i < W;i++){
vector<int> o;
for(int j = i;j < W && j - i < H;j++){
o.push_back((j - i) * W + j);
}
ow.push_back(add_or(o));
xw.push_back(add_xor(o));
}
for(int i = 0;i < W;i++){
vector<int> o;
for(int j = i;j >= 0 && i - j < H;j--){
o.push_back((i - j) * W + j);
}
oc.push_back(add_or(o));
xc.push_back(add_xor(o));
}
for(int i = 1;i < H;i++){
vector<int> o;
for(int j = i;j < H && W - 1 - j + i >= 0;j++){
o.push_back(j * W + W - 1 - j + i);
}
oc.push_back(add_or(o));
xc.push_back(add_xor(o));
}
for(int i = 0;i < H-K;i++){
ad.push_back(add_and({ow[i], ow[i+K]}));
}
f = add_and({add_not(add_or(xc)), add_or(ad)});
ad.clear();
for(int i = 0;i < W-K;i++){
ad.push_back(add_and({oc[i], oc[i+K]}));
}
l = add_and({add_not(add_or(xw)), add_or(ad)});
add_or({f, l});
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
256 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 |
20 ms |
1996 KB |
on inputs (80, 199), (81, 199), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |