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>
#define rep(i,n)for(int i=0;i<int(n);i++)
using namespace std;
void construct_network(int H, int W, int K) {
vector<int>look;
rep(i,H*W){
int r1=i/W,c1=i%W;
vector<int>v;
for(int j=i+1;j<H*W;j++){
int r2=j/W,c2=j%W;
if(abs(r1-r2)+abs(c1-c2)!=K){
v.push_back(j);
}
}
if(v.empty())continue;
int t=add_or(v);
look.push_back(add_and({i,t}));
}
if(look.empty()){
vector<int>v;
rep(i,H*W)v.push_back(i);
add_or(v);
return;
}
int t=add_or(look);
add_not(t);
}
# | 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... |