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 <bits/stdc++.h>
#include "vision.h"
using namespace std;
///H colums
bool dis(int x,int y, int xx, int yy, int K){
if(abs(x-xx)+abs(y-yy)==K){
return true;
}
return false;
}
void construct_network(int H, int W, int K) {
vector<int>v;
for(int i=0;i<H;i++){
for(int l=0;l<W;l++){
for(int ii=i;ii<H;ii++){
for(int ll=l;ll<W;ll++){
if(dis(i,l,ii,ll,K)==true){
//cout<<i<<","<<l<<" ^ "<<ii<<","<<ll<<" "<<i*H+l<<" "<<ii*H+ll<<endl;
if(add_and({i*W+l,ii*W+ll})==1){
return ;
}
}
}
}
}
}
//6 6 3
add_or(v);
/*add_not(c);
Ns = {0, 1};
int a = add_and(Ns);
Ns = {0, a};
int b = add_or(Ns);
Ns = {0, 1, b};
int c = add_xor(Ns);
add_not(c);*/
}
# | 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... |