catdog.cpp:8:1: error: 'vetcor' does not name a type
8 | vetcor<int>adj[MX];
| ^~~~~~
catdog.cpp: In function 'void dfs(int, int)':
catdog.cpp:12:20: error: 'adj' was not declared in this scope
12 | for (int i=0;i<adj[u].size();i++){
| ^~~
catdog.cpp:15:14: error: too few arguments to function 'void dfs(int, int)'
15 | dfs(v);
| ^
catdog.cpp:9:6: note: declared here
9 | void dfs(int u, int pre){
| ^~~
catdog.cpp: In function 'void hld(int, int)':
catdog.cpp:23:20: error: 'adj' was not declared in this scope
23 | for (int i=0;i<adj[u].size();i++){
| ^~~
catdog.cpp: At global scope:
catdog.cpp:32:44: error: 'cons' has not been declared
32 | friend node operator + (const node& a, cons node& b){
| ^~~~
catdog.cpp:32:53: error: expected ',' or '...' before '&' token
32 | friend node operator + (const node& a, cons node& b){
| ^
catdog.cpp: In function 'node operator+(const node&, int)':
catdog.cpp:33:13: error: expected ';' before 'c'
33 | node c;
| ^~
| ;
catdog.cpp:33:9: warning: statement has no effect [-Wunused-value]
33 | node c;
| ^~~~
catdog.cpp:34:9: error: 'c' was not declared in this scope
34 | c.a00=min(a.a00+b.a00, a.a01+b.a10);
| ^
catdog.cpp:34:25: error: 'b' was not declared in this scope
34 | c.a00=min(a.a00+b.a00, a.a01+b.a10);
| ^
catdog.cpp: In constructor 'segtree::segtree(int)':
catdog.cpp:47:20: error: cannot convert 'std::complex<double>' to 'int' in initialization
47 | for (int i=0i;<2*s;i++)cost[i].a01=cost[i].a10=1;
| ^~
| |
| std::complex<double>
catdog.cpp:47:23: error: expected primary-expression before '<' token
47 | for (int i=0i;<2*s;i++)cost[i].a01=cost[i].a10=1;
| ^
catdog.cpp: In member function 'void segtree::update(int, int&, int&)':
catdog.cpp:57:30: error: no match for 'operator+' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} and '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'})
57 | cost[i]=cost[i*2]+cost[i*2+1];
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from catdog.h:3,
from catdog.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:508:5: note: candidate: 'template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)'
508 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:508:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::reverse_iterator<_Iterator>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from catdog.h:3,
from catdog.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1540:5: note: candidate: 'template<class _Iterator> std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)'
1540 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1540:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::move_iterator<_IteratorL>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6022:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6022 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6022:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:56,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.tcc:1160:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
1160 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.tcc:1160:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: mismatched types 'const _CharT*' and 'node'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:56,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.tcc:1180:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
1180 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.tcc:1180:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6059:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)'
6059 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6059:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6075:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)'
6075 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6075:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6087:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
6087 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6087:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6093:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
6093 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6093:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6099:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
6099 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6099:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6121:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
6121 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6121:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: mismatched types 'const _CharT*' and 'node'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6127:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)'
6127 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6127:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from catdog.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6133:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*)'
6133 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:6133:5: note: template argument deduction/substitution failed:
catdog.cpp:57:41: note: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'node'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
57 | cost[i]=cost[i*2]+cost[i*2+1];
| ^
In file included from /usr/include/c++/10/string:55,