This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
vector<int> possibilities;
for(int i = 0; i < W; ++i){
for(int j = 0; j < H; ++j){
int PosAct = i + j*W;
vector<int> AtDistanceK;
AtDistanceK.push_back(PosAct);
for(int w = 0; w <= K; ++w){
int h = K - w;
//cout << i << " " << j << " " << w << endl;
if(i + w < W){
if(j + h < H){
AtDistanceK.push_back((j+h)*W + i + w);
}
if(j - h >= 0){
AtDistanceK.push_back((j-h)*W + i + w);
}
}
if(i - w >= 0){
if(j + h < H){
AtDistanceK.push_back((j+h)*W + i - w);
}
if(j - h >= 0){
AtDistanceK.push_back((j-h)*W + i - w);
}
}
}
if(AtDistanceK.size()==1)continue;
int hasTwoOnes = add_and({add_or(AtDistanceK), add_not(add_xor(AtDistanceK)), add_xor({PosAct})});
possibilities.push_back(hasTwoOnes);
//cout << memory[hasTwoOnes] << endl;
//print(AtDistanceK);
}
}
add_or(possibilities);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |