icc.cpp: In function 'void make_set(int)':
icc.cpp:10:56: error: request for member 'push_back' in 'node.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
10 | for (int i = 1; i <= n; i++) {par[i] = -1; node[i].push_back(i);}
| ^~~~~~~~~
icc.cpp: In function 'void union_set(int, int)':
icc.cpp:22:27: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
22 | for (int i: node[b]) node[a].push_back(i);
| ^
| std::begin
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from icc.cpp:1:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin' declared here
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
icc.cpp:22:27: error: 'end' was not declared in this scope; did you mean 'std::end'?
22 | for (int i: node[b]) node[a].push_back(i);
| ^
| std::end
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from icc.cpp:1:
/usr/include/c++/10/valarray:1244:5: note: 'std::end' declared here
1244 | end(const valarray<_Tp>& __va)
| ^~~
icc.cpp:22:38: error: request for member 'push_back' in 'node.std::vector<int>::operator[](((std::vector<int>::size_type)a))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
22 | for (int i: node[b]) node[a].push_back(i);
| ^~~~~~~~~
icc.cpp: In function 'void run(int)':
icc.cpp:42:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
42 | for (int v = 0; v < V.size(); v++) {
| ~~^~~~~~~~~~
icc.cpp:44:43: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
44 | for (int dm: node[V[v]]) a.push_back(dm);
| ^
| std::begin
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from icc.cpp:1:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin' declared here
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
icc.cpp:44:43: error: 'end' was not declared in this scope; did you mean 'std::end'?
44 | for (int dm: node[V[v]]) a.push_back(dm);
| ^
| std::end
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from icc.cpp:1:
/usr/include/c++/10/valarray:1244:5: note: 'std::end' declared here
1244 | end(const valarray<_Tp>& __va)
| ^~~
icc.cpp:47:43: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
47 | for (int dm: node[V[v]]) b.push_back(dm);
| ^
| std::begin
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from icc.cpp:1:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin' declared here
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
icc.cpp:47:43: error: 'end' was not declared in this scope; did you mean 'std::end'?
47 | for (int dm: node[V[v]]) b.push_back(dm);
| ^
| std::end
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from icc.cpp:1:
/usr/include/c++/10/valarray:1244:5: note: 'std::end' declared here
1244 | end(const valarray<_Tp>& __va)
| ^~~
icc.cpp:50:49: error: cannot convert 'std::vector<int>' to 'int*'
50 | int ans = query(a.size(), b.size(), a, b);
| ^
| |
| std::vector<int>
In file included from icc.cpp:2:
icc.h:10:30: note: initializing argument 3 of 'int query(int, int, int*, int*)'
10 | int query(int a, int b, int *A, int *B);
| ~~~~~^
icc.cpp:59:54: error: cannot convert 'std::vector<int>' to 'int*'
59 | ans = query(a2.size(), b.size(), a2, b);
| ^~
| |
| std::vector<int>
In file included from icc.cpp:2:
icc.h:10:30: note: initializing argument 3 of 'int query(int, int, int*, int*)'
10 | int query(int a, int b, int *A, int *B);
| ~~~~~^
icc.cpp:63:23: error: 'v' was not declared in this scope
63 | a2 = {v[l]};
| ^
icc.cpp:63:27: error: no match for 'operator=' (operand types are 'std::vector<int>' and '<brace-enclosed initializer list>')
63 | a2 = {v[l]};
| ^
In file included from /usr/include/c++/10/vector:72,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from icc.cpp:1:
/usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<int>&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from icc.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<int>'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
icc.cpp:64:45: warning: right operand of comma operator has no effect [-Wunused-value]
64 | l = 0, r = b.size() - 1, mid;
| ^
icc.cpp:71:47: error: cannot convert 'std::vector<int>' to 'int*'
71 | ans = query(1, b2.size(), a2, b2);
| ^~
| |
| std::vector<int>
In file included from icc.cpp:2:
icc.h:10:30: note: initializing argument 3 of 'int query(int, int, int*, int*)'
10 | int query(int a, int b, int *A, int *B);
| ~~~~~^
icc.cpp:75:27: error: no match for 'operator=' (operand types are 'std::vector<int>' and '<brace-enclosed initializer list>')
75 | b2 = {v[l]};
| ^
In file included from /usr/include/c++/10/vector:72,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from icc.cpp:1:
/usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<int>&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from icc.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<int>'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~