gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:20:29: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>)'
rep.pb(mp(i, arr[i] - n) );
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from gondola.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const value_type& {aka const int&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<int>::value_type&& {aka int&&}'
gondola.cpp:22:27: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>)'
else v.pb(mp(i, arr[i]) );
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from gondola.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const value_type& {aka const int&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<int>::value_type&& {aka int&&}'
gondola.cpp:6:12: error: request for member 'second' in 'v.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define yy second
^
gondola.cpp:25:19: note: in expansion of macro 'yy'
int diff = v[0].yy - v[0].xx;
^~
gondola.cpp:5:12: error: request for member 'first' in 'v.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define xx first
^
gondola.cpp:25:29: note: in expansion of macro 'xx'
int diff = v[0].yy - v[0].xx;
^~
gondola.cpp:5:12: error: request for member 'first' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define xx first
^
gondola.cpp:30:13: note: in expansion of macro 'xx'
if (v[i].xx <= end){
^~
gondola.cpp:6:12: error: request for member 'second' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define yy second
^
gondola.cpp:31:14: note: in expansion of macro 'yy'
if (v[i].yy - v[i].xx != diff) return 0;
^~
gondola.cpp:5:12: error: request for member 'first' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define xx first
^
gondola.cpp:31:24: note: in expansion of macro 'xx'
if (v[i].yy - v[i].xx != diff) return 0;
^~
gondola.cpp:6:12: error: request for member 'second' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define yy second
^
gondola.cpp:34:14: note: in expansion of macro 'yy'
if (v[i].yy - v[i].xx != diff2) return 0;
^~
gondola.cpp:5:12: error: request for member 'first' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
#define xx first
^
gondola.cpp:34:24: note: in expansion of macro 'xx'
if (v[i].yy - v[i].xx != diff2) return 0;
^~