0_0_20997727_15522.cpp: In function 'void get_dist(int, int, int, int)':
0_0_20997727_15522.cpp:48:72: error: too few arguments to function 'void get_dist(int, int, int, int)'
if (!vis[e[i].v] && e[i].v != fa) get_dist(e[i].v, t, depth + 1);
^
0_0_20997727_15522.cpp:41:6: note: declared here
void get_dist(int t, int fa, int depth, int flag) {
^
0_0_20997727_15522.cpp: In function 'void modify(int, int)':
0_0_20997727_15522.cpp:70:43: error: 'get_length' was not declared in this scope
tree[id[p][0]].add(get_length(t, p), d);
^
0_0_20997727_15522.cpp: In function 'int ask(int, int)':
0_0_20997727_15522.cpp:78:50: error: no match for ternary 'operator?:' (operand types are 'bool', 'int', and 'std::vector<int>')
int len = d - (top == dist[t].size() - 1 ? 0 : dist[top + 1]);
^
0_0_20997727_15522.cpp:80:17: error: no match for 'operator-' (operand types are 'int' and 'std::vector<int>')
len = d - dist[top];
^
0_0_20997727_15522.cpp:80:17: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:60,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:328:5: note: template<class _Iterator> typename std::reverse_iterator<_Iterator>::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator-(const reverse_iterator<_Iterator>& __x,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:328:5: note: template argument deduction/substitution failed:
0_0_20997727_15522.cpp:80:27: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
len = d - dist[top];
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:60,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:380:5: note: template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator-(const reverse_iterator<_IteratorL>& __x,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:380:5: note: template argument deduction/substitution failed:
0_0_20997727_15522.cpp:80:27: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
len = d - dist[top];
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:60,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:1121:5: note: template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
operator-(const move_iterator<_IteratorL>& __x,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:1121:5: note: template argument deduction/substitution failed:
0_0_20997727_15522.cpp:80:27: note: mismatched types 'const std::move_iterator<_Iterator>' and 'int'
len = d - dist[top];
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:60,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:1128:5: note: template<class _Iterator> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
operator-(const move_iterator<_Iterator>& __x,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:1128:5: note: template argument deduction/substitution failed:
0_0_20997727_15522.cpp:80:27: note: mismatched types 'const std::move_iterator<_Iterator>' and 'int'
len = d - dist[top];
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:65:0,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_bvector.h:208:3: note: std::ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)
operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_bvector.h:208:3: note: no known conversion for argument 1 from 'int' to 'const std::_Bit_iterator_base&'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:60,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:911:5: note: template<class _Iterator, class _Container> typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:911:5: note: template argument deduction/substitution failed:
0_0_20997727_15522.cpp:80:27: note: mismatched types 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' and 'int'
len = d - dist[top];
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:60,
from 0_0_20997727_15522.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:899:5: note: template<class _IteratorL, class _IteratorR, class _Container> decltype ((__lhs.base() - __rhs.base())) __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:899:5: note: template argument deduction/substitution failed:
0_0_20997727_15522.cpp:80:27: note: mismatched types 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' and 'int'
len = d - dist[top];
^
0_0_20997727_15522.cpp: In function 'int main()':
0_0_20997727_15522.cpp:98:9: error: 'depth' was not declared in this scope
depth[1] = 0;
^
0_0_20997727_15522.cpp:99:24: error: 'get_father' was not declared in this scope
get_father(1, 0), process_father();
^
0_0_20997727_15522.cpp:99:42: error: 'process_father' was not declared in this scope
get_father(1, 0), process_father();
^
|