factories.cpp: In function 'long long int dfsz(long long int, long long int)':
factories.cpp:30:12: error: expected ';' before '.' token
30 | for(auto v.first:G[u]){
| ^
| ;
factories.cpp:30:12: error: expected primary-expression before '.' token
factories.cpp:30:18: error: found ':' in nested-name-specifier, expected '::'
30 | for(auto v.first:G[u]){
| ^
| ::
factories.cpp:30:13: error: request for member 'first' in non-class type '<type error>'
30 | for(auto v.first:G[u]){
| ^~~~~
factories.cpp:30:23: error: expected ';' before ')' token
30 | for(auto v.first:G[u]){
| ^
| ;
factories.cpp:31:6: error: use of 'v' before deduction of 'auto'
31 | if(v.first!=p){
| ^
factories.cpp:32:16: error: use of 'v' before deduction of 'auto'
32 | sz[u]+=dfsz(v.first,u);
| ^
factories.cpp: In function 'void dfs2(long long int, long long int, long long int, long long int)':
factories.cpp:46:2: error: 'dis' was not declared in this scope; did you mean 'div'?
46 | dis[c][u]=0;
| ^~~
| div
factories.cpp: In function 'void upd(long long int)':
factories.cpp:56:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
56 | ans[v]=min(ans[v],dis[v][u]);
| ^~~
| abs
factories.cpp:56:21: error: 'dis' was not declared in this scope; did you mean 'div'?
56 | ans[v]=min(ans[v],dis[v][u]);
| ^~~
| div
factories.cpp: In function 'long long int query(long long int)':
factories.cpp:64:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
64 | mi=min(ans[v]+dis[v][u],mi);
| ^~~
| abs
factories.cpp:64:17: error: 'dis' was not declared in this scope; did you mean 'div'?
64 | mi=min(ans[v]+dis[v][u],mi);
| ^~~
| div
factories.cpp: In function 'void build(long long int, long long int)':
factories.cpp:77:17: error: request for member 'first' in 'v', which is of non-class type 'long long int'
77 | G[c].erase({v.first,v.second});
| ^~~~~
factories.cpp:77:25: error: request for member 'second' in 'v', which is of non-class type 'long long int'
77 | G[c].erase({v.first,v.second});
| ^~~~~~
factories.cpp:77:32: error: no matching function for call to 'std::set<std::pair<long long int, long long int> >::erase(<brace-enclosed initializer list>)'
77 | G[c].erase({v.first,v.second});
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from factories.cpp:1:
/usr/include/c++/10/bits/stl_set.h:654:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, long long int>; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator]'
654 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:654:28: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::pair<long long int, long long int> >::const_iterator' {aka 'std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator'}
654 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:684:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<long long int, long long int>; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
684 | erase(const key_type& __x)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:684:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<long long int, long long int>&'}
684 | erase(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, long long int>; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator]'
706 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate expects 2 arguments, 1 provided
factories.cpp:78:17: error: request for member 'first' in 'c', which is of non-class type 'long long int'
78 | G[v].erase({c.first,v.second});
| ^~~~~
factories.cpp:78:25: error: request for member 'second' in 'v', which is of non-class type 'long long int'
78 | G[v].erase({c.first,v.second});
| ^~~~~~
factories.cpp:78:32: error: no matching function for call to 'std::set<std::pair<long long int, long long int> >::erase(<brace-enclosed initializer list>)'
78 | G[v].erase({c.first,v.second});
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from factories.cpp:1:
/usr/include/c++/10/bits/stl_set.h:654:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, long long int>; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator]'
654 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:654:28: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::pair<long long int, long long int> >::const_iterator' {aka 'std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator'}
654 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:684:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<long long int, long long int>; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
684 | erase(const key_type& __x)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:684:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<long long int, long long int>&'}
684 | erase(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<long long int, long long int>; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator]'
706 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate expects 2 arguments, 1 provided
factories.cpp: In function 'void Init(long long int, long long int*, long long int*, long long int*)':
factories.cpp:20:12: error: 'class std::set<std::pair<long long int, long long int> >' has no member named 'push_back'
20 | #define pb push_back
| ^~~~~~~~~
factories.cpp:85:13: note: in expansion of macro 'pb'
85 | G[A[i]+1].pb({B[i]+1,D[i]});
| ^~
factories.cpp:20:12: error: 'class std::set<std::pair<long long int, long long int> >' has no member named 'push_back'
20 | #define pb push_back
| ^~~~~~~~~
factories.cpp:86:13: note: in expansion of macro 'pb'
86 | G[B[i]+1].pb({A[i]+1,D[i]});
| ^~
factories.cpp: In function 'long long int Query(long long int, long long int*, long long int, long long int*)':
factories.cpp:92:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
92 | ans[i]=INF;
| ^~~
| abs
In file included from /usr/include/c++/10/vector:66,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from factories.cpp:1:
/usr/include/c++/10/bits/stl_uninitialized.h: In instantiation of '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >; _ForwardIterator = long long int*]':
/usr/include/c++/10/bits/stl_uninitialized.h:325:37: required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >; _ForwardIterator = long long int*; _Tp = long long int]'
/usr/include/c++/10/bits/stl_vector.h:1585:33: required from 'void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >; _Tp = long long int; _Alloc = std::allocator<long long int>]'
/usr/include/c++/10/bits/stl_vector.h:657:23: required from 'std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >; <template-parameter-2-2> = void; _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<long long int>]'
factories.cpp:75:40: required from here
/usr/include/c++/10/bits/stl_uninitialized.h:137:72: error: static assertion failed: result type must be constructible from value type of input range
137 | static_assert(is_constructible<_ValueType2, decltype(*__first)>::value,
| ^~~~~