Submission #146991

#TimeUsernameProblemLanguageResultExecution timeMemory
146991gs18115Vision Program (IOI19_vision)C++14
20 / 100
14 ms1528 KiB
#include"vision.h" #include<algorithm> #define eb emplace_back #define fi first #define se second #define all(x) (x).begin(),(x).end() using namespace std; typedef long long ll; typedef pair<int,int>pi; typedef pair<ll,ll>pl; const ll inf=1e18; void construct_network(int H,int W,int K) { vector<int>r,c; vector<int>q,q1,q2; int zero; zero=add_xor(vector<int>(2,0)); int fs; int i,j; int n=H+W-1; for(i=0;i<n;i++) { for(j=0;j<H;j++) { if(i-j>=W&&j<=i) continue; q.eb(j*W+i-j); } r.eb(add_or(q)); q.clear(); } for(i=0;i<n;i++) { for(j=0;j<H&&j<=i;j++) { if(i-j>=W) continue; q.eb(j*W+W-i+j-1); } c.eb(add_or(q)); q.clear(); } for(i=0;i+K<n;i++) { q.eb(r[i]); q.eb(r[i+K]); q1.eb(add_and(q)); q.clear(); q.eb(c[i]); q.eb(c[i+K]); q1.eb(add_and(q)); q.clear(); } fs=zero; for(i=K;++i<n;) { q.eb(fs); q.eb(r[i-K-1]); fs=add_or(q); q.clear(); q.eb(fs); q.eb(r[i]); q2.eb(add_and(q)); q.clear(); } fs=zero; for(i=K;++i<n;) { q.eb(fs); q.eb(c[i-K-1]); fs=add_or(q); q.clear(); q.eb(fs); q.eb(c[i]); q2.eb(add_and(q)); q.clear(); } q.eb(add_or(q1)); if(!q2.empty()) q.eb(add_not(add_or(q2))); add_and(q); q.clear(); return; }
#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...