Submission #299486

#TimeUsernameProblemLanguageResultExecution timeMemory
299486TMJNVision Program (IOI19_vision)C++17
44 / 100
8 ms1404 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { vector<int>h,w,v; int h_xor,w_xor; for(int i=0;i<H;i++){ vector<int>t; for(int j=0;j<W;j++){ t.push_back(W*i+j); } h.push_back(add_or(t)); } h_xor=add_xor(h); for(int i=0;i<W;i++){ vector<int>t; for(int j=0;j<H;j++){ t.push_back(W*j+i); } w.push_back(add_or(t)); } w_xor=add_xor(w); for(int i=0;i<H;i++){ for(int j=i+1;j<H;j++){ for(int k=0;k<W;k++){ int l=K-(j-i)+k; if(l<=k||W<=l)continue; v.push_back(add_and({h[i],h[j],w[k],w[l]})); } } } for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ int k=j+K; if(k<=j||W<=k)continue; v.push_back(add_and({h_xor,h[i],w[j],w[k]})); } } for(int i=0;i<W;i++){ for(int j=0;j<H;j++){ int k=j+K; if(k<=j||H<=k)continue; v.push_back(add_and({w_xor,w[i],h[j],h[k]})); } } add_xor(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...