# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
834388 | 2023-08-22T13:54:44 Z | Marco_Escandon | Vision Program (IOI19_vision) | C++17 | 0 ms | 0 KB |
#include<bits/stdc++.h> using namespace std; typedef int ll; void construct_network(int H, int W, int K) { vector<int> inst; for(int i=0; i<H; i++) { for(int j=0; j<W; j++) { vector<ll> query; for(int l=-K-1; l<=K; l++) { if(i+l<H&& i+l>=0 && j+K-abs(l)<W) { query.push_back((i+l)*W+ j+K-abs(l)); //cout<<(i+l)*W+ j+K-abs(l)<<" "; } } if(query.size()!=0) { ll a= query[0]; if(query.size()!=1) a=add_or(query); inst.push_back(add_and({(i*W+j),a})); } //cout<<"\n"; } } ll a=add_or(inst); }