Submission #1026852

#TimeUsernameProblemLanguageResultExecution timeMemory
1026852NicolaikrobVision Program (IOI19_vision)C++17
44 / 100
8 ms1496 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void sol(int h, int w, int k) { vector<int> T; for(int l = 0; l < w; l++) { if(l<=k && k-l < h) { T.push_back((k-l)*w+l); } } add_or(T); exit(0); } void construct_network(int h, int w, int k) { if(h*w > 3000) sol(h, w, k); vector<int> T1, T2; int c = 0; for(int i = 0; i < h; i++) { for(int j = 0; j < w; j++) { T1.clear(); T2.clear(); T1.push_back(i*w+j); for(int l = 0; l < w; l++) { if(abs(j-l)<=k && i+k-abs(j-l) < h) { T2.push_back((i+k-abs(j-l))*w+l); } } if(! T2.size()) continue; c = add_or(T1); c = add_or(T2); T1 = {c-1, c}; c = add_and(T1); } } T1.clear(); for(int i = w*h+2; i <= c; i += 3) T1.push_back(i); add_or(T1); }
#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...