#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
int a, b, c, d;
vector< int > ans;
/*void add_xor(vector< int > v){
int rep = 0;
for(auto e : v){
rep ^= ans[e];
}
ans.push_back(rep);
}
void add_and(vector< int > v){
int rep = 1;
for(auto e : v){
rep &= ans[e];
}
ans.push_back(rep);
}
void add_or(vector< int > v){
int rep = 0;
for(auto e : v){
rep |= ans[e];
}
ans.push_back(rep);
}*/
void construct_network(int H, int W, int K) {
vector< int > finalCheck;
int curr = H*W;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
vector< int > goodDist;
for(int k = 0; k < H; k++){
for(int l = 0; l < W; l++){
if(abs(i-k)+abs(j-l) == K){
goodDist.push_back(k*W+l);
}
}
}
if(goodDist.empty()) continue;
//cout << "GOODDIST" << endl;
for(int e : goodDist){
cout << e << ' ';
}
cout << endl;
add_xor(goodDist);
curr++;
//cout << "ADD " << i*W+j << ' ' << curr-1 << endl;
add_and({i*W+j,curr-1});
finalCheck.push_back(curr);
curr++;
}
}
add_or(finalCheck);
}
/*int main(){
int h, w, k;
cin >> h >> w >> k;
cin >> a >> b>>c >> d;
bool verif ;
cin >> verif;
for(int i = 0; i < h; i++){
for(int j= 0; j < w; j++){
//cout << "HERE " << i << ' ' << j << endl;
if((i == a && j == b) || (i == c && j == d)){
ans.push_back(1);
}
else ans.push_back(0);
}
}
/*for(int e : ans) cout << e << ' ';
cout << endl;
construct_network(h,w,k);
for(int e : ans) cout << e << ' ';
cout << endl;
if(verif && ans.back()== 1) cout << "JUSTE" << endl;
else cout << "WRONG" << endl;
}*/
Compilation message
vision.cpp:84:2: warning: "/*" within comment [-Wcomment]
84 | /*for(int e : ans) cout << e << ' ';
|
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
194 ms |
1232 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |