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;
int a,b,c,d,e,i,j,ii,jj,zx,xc,K;
vector <int> X[409],Y[409],V,vv;
int ID(int q, int w){
return q*b+w;
}
void construct_network(int HH, int WW, int KK) {
a=HH;b=WW;K=KK;
for(i=0; i<=402; i++){
X[i].clear();Y[i].clear();V.clear();vv.clear();
}
for(i=0; i<a; i++){
for(j=0; j<b; j++){
ii=i+j;jj=i-j+b;
X[ii].push_back(ID(i,j));
Y[jj].push_back(ID(i,j));
}
}
for(i=0; i<=400; i++){
j=i+K;if(j>400) break;
if(X[i].size()==0||X[j].size()==0) continue;
c=add_or(X[i]);d=add_or(X[j]);
vv.clear();vv.push_back(c);vv.push_back(d);
e=add_and(vv);
V.push_back(e);
}
for(i=0; i<=400; i++){
j=i+K;if(j>400) break;
if(Y[i].size()==0||Y[j].size()==0) continue;
c=add_or(Y[i]);d=add_or(Y[j]);
vv.clear();vv.push_back(c);vv.push_back(d);
e=add_and(vv);
V.push_back(e);
}
c=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... |