# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
856393 | 2023-10-03T11:19:41 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){ int total = h * w; for(int i = 0; i < h * w; i++){ for(int j = i + 1; j < h * w; j++){ if(abs(i / w - j / w) + abs(i % w - j % w) == K){ add_and({i, j}); total++; } } } vector<int> ans; for(int i = h * w; i < total; i++) ans.push_back(i); add_or(ans); }