Submission #546461

#TimeUsernameProblemLanguageResultExecution timeMemory
546461krit3379Vision Program (IOI19_vision)C++17
0 / 100
25 ms3520 KiB
#include<bits/stdc++.h> using namespace std; #include"vision.h" #define N 205 int a[N][N]; vector<int> l[2*N],r[2*N],tl,tr,qsl,qsr; bool sol(int k,int h,int w){ int i; vector<int> t; for(i=0;i+k<h+w-1;i++){ t.push_back(add_and({qsl[i],tl[i+k]})); t.push_back(add_and({qsr[i],tr[i+k]})); } return add_or(t); } void construct_network(int h, int w, int k){ int i,j,sz=0; for(i=0;i<h;i++){ for(j=0;j<w;j++){ a[i][j]=sz++; } } for(i=0;i<h;i++){ for(j=0;j<w;j++){ l[i+j].push_back(a[i][j]); r[h-i-1+j].push_back(a[i][j]); } } for(i=0;i<h+w-1;i++){ tl.push_back(add_or(l[i])); qsl.push_back(add_or(tl)); tr.push_back(add_or(r[i])); qsr.push_back(add_or(tr)); } if(k==h+w-2)sol(k,h,w); else add_and({sol(k,h,w),add_not(sol(k+1,h,w))}); }
#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...