Submission #558851

#TimeUsernameProblemLanguageResultExecution timeMemory
558851mosiashvililukaVision Program (IOI19_vision)C++14
12 / 100
17 ms2516 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...