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;
int row , col;
pair<int ,int>cmp , comp;
vector<int>num , opt , erg;
pair<int , int> transf(int x){
return {x % col , x / col};
}
void construct_network(int H, int W , int K) {
row = H;
col = W;
int menge = row * col , pl = menge;
for(int i = 0 ; i < menge ; i++){
cmp = transf(i);
for(int j = i + 1 ; j < menge ; j++){
comp = transf(j);
if(abs(cmp.first - comp.first) + abs(cmp.second - comp.second) == K){
opt.push_back(j);
}
}
if(opt.size()){
add_or(opt);
pl++;
add_and({i , pl - 1});
num.push_back(pl);
pl++;
}
opt.clear();
if(menge > 900){
break;
}
}
add_or(num);
}
# | 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... |