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>
#ifdef EVAL
#else
#include"grader.cpp"
#endif
using namespace std;
vector<int>g1[405],g2[405];
void construct_network(int H,int W,int K){
for(int i=0;i<H;i++)
for(int j=0;j<W;j++){
g1[i+j].push_back(i*W+j);
g2[i-j+W-1].push_back(i*W+j);
}
vector<int>cas,rdiag,ldiag,prefr,prefl;
for(int i=0;i<=H+W-2;i++){
rdiag.push_back(add_or(g1[i]));
ldiag.push_back(add_or(g2[i]));
prefr.push_back(add_or(rdiag));
prefl.push_back(add_or(ldiag));
if(i>=K){
cas.push_back(add_and({rdiag[i],prefr[i-K]}));
cas.push_back(add_and({ldiag[i],prefl[i-K]}));
}
}
add_or(cas);
}
# | 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... |