# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206766 | 2020-03-05T07:16:12 Z | joylintp | Vision Program (IOI19_vision) | C++17 | 0 ms | 0 KB |
#include<bits/stdc++.h> using namespace std; void construct_network(int h, int w, int k) { vector<int> v; for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) for (int a = i; a < h; a++) for (int b = 0; b < w; b++) if (abs(a - i) + abs(b - j) == k) v.push_back(add_and({i * w + j, a * w + b})); add_or(v); } // * * ***** * * * * // * * * ** * * * // ***** ***** * * * * * // * * * * ** * * // * * ***** * * *** // ***** ***** * * * ***** * * ***** ***** // * * * * * * * ** * * * * // * * * ***** * * * * * * ***** // * * * * * * * * ** * * // **** ***** * ***** ***** * * * *