이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"vision.h"
#include<bits/stdc++.h>
#ifdef EVAL
#else
#include"grader.cpp"
#endif
using namespace std;
vector<int>g1[405],g2[405];
int run(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]}));
}
}
return add_or(cas);
}
void construct_network(int H,int W,int K){
if(H+W-2==K)add_or({run(H,W,K)});
else add_xor({run(H,W,K),run(H,W,K+1)});
}
# | 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... |