#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
vector<int>h,w,v;
vector<int>h_dis,w_dis;
for(int i=0;i<H;i++){
vector<int>t;
for(int j=0;j<W;j++){
t.push_back(W*i+j);
}
h.push_back(add_or(t));
}
h_dis.push_back(add_xor(h));
for(int i=0;i<W;i++){
vector<int>t;
for(int j=0;j<H;j++){
t.push_back(W*j+i);
}
w.push_back(add_or(t));
}
h_dis.push_back(add_xor(w));
for(int i=1;i<H;i++){
vector<int>tmpvec;
for(int j=0;j<H;j++){
if(j+i>=H)break;
tmpvec.push_back(add_and({h[j],h[j+i]}));
}
h_dis.push_back(add_or(tmpvec));
}
for(int i=1;i<W;i++){
vector<int>tmpvec;
for(int j=0;j<W;j++){
if(j+i>=W)break;
tmpvec.push_back(add_and({w[j],w[j+i]}));
}
w_dis.push_back(add_or(tmpvec));
}
for(int i=0;i<H;i++){
int j=K-i;
if(j<0||W<=j)continue;
v.push_back(add_and({h_dis[i],w_dis[j]}));
}
add_xor(v);
}
# |
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 |
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 |
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 |
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 |
2 ms |
1148 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
1404 KB |
WA in grader: Too many instructions |
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 |
- |