# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
257705 | 2020-08-04T15:09:35 Z | a_player | Vision Program (IOI19_vision) | C++14 | 0 ms | 0 KB |
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { int cont=H*W; vector<int> s(2); 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){ s[0]=i; s[1]=j; add_and(s); cont++; } } } vector<int> v; for(int i=H*W;i<cont;i++)v.push_back(i); add_or(v); }