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) {
int cont=H*W;
vector<int> s(2);
for(int i=0;i<H;i++)
for(int j=0;j<W;j++)
for(int a=0;a<H;a++)
for(int b=0;b<W;b++){
if(abs(i-a)+abs(j-b)==K){
s[0]=i*W+j;
s[1]=a*W+b;
add_and(s);
cont++;
}
}
vector<int> v;
for(int i=H*W;i<cont;i++)v.push_back(i);
add_or(v);
}
# | 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... |