# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1048410 | 2024-08-08T07:26:52 Z | TahirAliyev | 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) { for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ if(add_not(i * W + j)) continue; vector<int> v; for(int k = 0; k < H; k++){ int x = i + k, y = j + K - k; if(x < 0 || x >= H || y < 0 || y >= W) continue; v.push_back(x * W + y); int x = i + k, y = j - (K - k); if(x < 0 || x >= H || y < 0 || y >= W) continue; v.push_back(x * W + y); } if(add_or(v)) return; } } }