# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
856395 | 2023-10-03T11:32:01 Z | Trisanu_Das | Vision Program (IOI19_vision) | C++17 | 0 ms | 0 KB |
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int h, int w, int k){ vector<int> ans; for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ vector<int> res; for(int x = 0; x < h; x++) for(int y = 0; y < w; y++) if(abs(i - x) + abs(j - y) == k) res.push_back(x * w + y); if(!res.empty()) ans.push_back(add_and({add_or(res, i * w + j)})); } } add_or(ans); }