Submission #299489

#TimeUsernameProblemLanguageResultExecution timeMemory
299489TMJNVision Program (IOI19_vision)C++17
32 / 100
6 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; vector<int>h_dis,w_dis; 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_dis.push_back(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_dis.push_back(add_xor(w)); for(int i=1;i<H;i++){ vector<int>tmpvec; for(int j=0;j<H;j++){ if(j+i>=H)break; tmpvec.push_back(add_and({h[j],h[j+i]})); } h_dis.push_back(add_or(tmpvec)); } for(int i=1;i<W;i++){ vector<int>tmpvec; for(int j=0;j<W;j++){ if(j+i>=W)break; tmpvec.push_back(add_and({w[j],w[j+i]})); } w_dis.push_back(add_or(tmpvec)); } for(int i=0;i<H;i++){ int j=K-i; if(j<0||W<=j)continue; v.push_back(add_and({h_dis[i],w_dis[j]})); } 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...