circuit.cpp: In function 'void init(int, int, int)':
circuit.cpp:27:60: error: no matching function for call to 'std::vector<std::pair<int, int> >::resize(std::vector<std::pair<int, int> >::size_type, int)'
seg[i].resize(seg[i * 2].size() + seg[i * 2 + 1].size(), 0);
^
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 circuit.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:689:7: note: candidate: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]
resize(size_type __new_size)
^~~~~~
/usr/include/c++/7/bits/stl_vector.h:689:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/7/bits/stl_vector.h:709:7: note: candidate: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
resize(size_type __new_size, const value_type& __x)
^~~~~~
/usr/include/c++/7/bits/stl_vector.h:709:7: note: no known conversion for argument 2 from 'int' to 'const value_type& {aka const std::pair<int, int>&}'
circuit.cpp:30:12: error: no match for 'operator=' (operand types are 'std::vector<std::pair<int, int> >' and 'const pii {aka const std::pair<int, int>}')
seg[i] = j;
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from circuit.cpp:1:
/usr/include/c++/7/bits/vector.tcc:179:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/vector.tcc:179:5: note: no known conversion for argument 1 from 'const pii {aka const std::pair<int, int>}' to 'const std::vector<std::pair<int, int> >&'
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 circuit.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:461:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:461:7: note: no known conversion for argument 1 from 'const pii {aka const std::pair<int, int>}' to 'std::vector<std::pair<int, int> >&&'
/usr/include/c++/7/bits/stl_vector.h:482:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
operator=(initializer_list<value_type> __l)
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: note: no known conversion for argument 1 from 'const pii {aka const std::pair<int, int>}' to 'std::initializer_list<std::pair<int, int> >'
circuit.cpp:33:12: error: no match for 'operator=' (operand types are 'std::vector<std::pair<int, int> >' and 'const pii {aka const std::pair<int, int>}')
seg[i] = j;
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from circuit.cpp:1:
/usr/include/c++/7/bits/vector.tcc:179:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/vector.tcc:179:5: note: no known conversion for argument 1 from 'const pii {aka const std::pair<int, int>}' to 'const std::vector<std::pair<int, int> >&'
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 circuit.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:461:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:461:7: note: no known conversion for argument 1 from 'const pii {aka const std::pair<int, int>}' to 'std::vector<std::pair<int, int> >&&'
/usr/include/c++/7/bits/stl_vector.h:482:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
operator=(initializer_list<value_type> __l)
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: note: no known conversion for argument 1 from 'const pii {aka const std::pair<int, int>}' to 'std::initializer_list<std::pair<int, int> >'