#include <bits/stdc++.h>
#include "vision.h"
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#pragma GCC target("popcnt")
#define endl '\n'
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define fo(i,n) for(auto i =0 ; i < n;i++)
#define fore(i,l,r) for(auto i = l; i < r;i++)
#define forex(i,r,l) for(auto i = r; i >= l; i--)
#define ffo(i,n) forex(i,n-1,0)
#define all(x) x.begin(),x.end()
#define lsb(x) x&(-x)
#define sz(x) (int)x.size()
#define gcd(a,b) __gcd(a,b)
#define vii vector<ii>
#define pq_min(a) priority_queue<a, vector<a>, greater<a>>
#define fls cout.flush()
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using ii = pair<int,int>;
using mii = map<int,int>;
using lld = long double;
void valid(ll in){cout<<((in)?"YES\n":"NO\n");}
/*
std::vector<int> Ns;
Ns = {0, 1};
int a = add_and(Ns);
Ns = {0, a};
int b = add_or(Ns);
Ns = {0, 1, b};
int c = add_xor(Ns);
add_not(c);
*/
void construct_network(int n,int m, int k){
int c=n*m;
vi d;
vi resp;
fo(r1,n){
fo(c1,m){
vi rombo;
fo(r2,n){
fo(c2,m){
if(abs(r1-r2)+abs(c2-c1)==k){
rombo.pb(r2*H+c2);
}
}
}
add_or(rombo);
add_and({r1*H+c1, c});
resp.pb(c+1);
c+=2;
}
}
add_or(resp);
}
Compilation message
vision.cpp:5: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
5 | #pragma GCC optimization ("O3")
|
vision.cpp:6: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
6 | #pragma GCC optimization ("unroll-loops")
|
vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:52:37: error: 'H' was not declared in this scope
52 | rombo.pb(r2*H+c2);
| ^
vision.cpp:57:25: error: 'H' was not declared in this scope
57 | add_and({r1*H+c1, c});
| ^
vision.cpp:57:33: error: could not convert '{<expression error>, c}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
57 | add_and({r1*H+c1, c});
| ^
| |
| <brace-enclosed initializer list>