Submission #415415

#TimeUsernameProblemLanguageResultExecution timeMemory
415415wiwihoVision Program (IOI19_vision)C++14
44 / 100
15 ms2284 KiB
#include "vision.h" #include <bits/stdc++.h> #define eb emplace_back using namespace std; int h, w, k; int getid(int x, int y){ return x * w + y; } void construct_network(int _h, int _w, int _k){ h = _h; w = _w; k = _k; vector<int> all; for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ vector<int> tmp; for(int y = max(j - k, 0); y < w && y <= j + k; y++){ int x; if(y >= j) x = k + i + j - y; else x = k + i - j + y; if(x >= h) continue; //cerr << i << " " << j << " " << x << " " << y << "\n"; tmp.eb(getid(x, y)); } if(tmp.empty()) continue; int a = add_or(tmp); int b = add_and({getid(i, j), a}); all.eb(b); } } add_or(all); }
#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...