#include "vision.h"
#include <bits/stdc++.h>
#define checker(a) cout << "checker reached " << a << "\n"
using namespace std;
int h,w;
int getPos(int x,int y){
return x*w+y;
}
int getDis(pair<int,int> p1,pair<int,int> p2){
return abs(p1.first-p2.first)+abs(p1.second-p2.second);
}
void construct_network(int H, int W, int k) {
h=H,w=W;
vector<vector<int>> ro,col;
for(int i=0;i<h;i++){
ro.push_back(vector<int>());
for(int j=0;j<w;j++)
ro[i].push_back(getPos(i,j));
}
for(int i=0;i<w;i++){
col.push_back(vector<int>());
for(int j=0;j<h;j++)
col[i].push_back(getPos(j,i));
}
vector<int> Xor;
for(vector<int> vec:ro)
Xor.push_back(add_xor(vec));
for(vector<int> vec:col)
Xor.push_back(add_xor(vec));
vector<int> Not;
for(int a:Xor)
Not.push_back(add_not(a));
Xor.clear();
vector<int> Or;
for(vector<int> vec:ro)
Or.push_back(add_or(vec));
for(vector<int> vec:col)
Or.push_back(add_or(vec));
vector<int> And;
for(size_t i=0;i<Or.size();i++)
And.push_back(add_and((vector<int>){Or[i],Not[i]}));
add_or(And);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
2324 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
2 ms |
460 KB |
on inputs (48, 2), (50, 2), expected 0, but computed 1 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |