0_0_21554669_22593.cpp: In function 'void dfs(int)':
0_0_21554669_22593.cpp:20:23: error: 'son' was not declared in this scope
if(sz[v] > sz[son[x]]) son[x] = v[i];
^
0_0_21554669_22593.cpp:20:43: error: 'i' was not declared in this scope
if(sz[v] > sz[son[x]]) son[x] = v[i];
^
0_0_21554669_22593.cpp: In function 'void dfs2(int, int)':
0_0_21554669_22593.cpp:25:5: error: 'top' was not declared in this scope
top[x] = y; // 最近的重祖先 ?
^
0_0_21554669_22593.cpp:26:8: error: 'son' was not declared in this scope
if(son[x]) dfs2(son[x],y);
^
0_0_21554669_22593.cpp:28:32: error: 'son' was not declared in this scope
if(v == gfa[x] || v == son[x]) continue;
^
0_0_21554669_22593.cpp:29:16: error: 'i' was not declared in this scope
dfs2(v[i],v[i]);
^
0_0_21554669_22593.cpp: In function 'int Fa2(int)':
0_0_21554669_22593.cpp:34:12: error: expected primary-expression before 'return'
return return fa2[x] == x? x: fa2[x] = Fa2(fa2[x]);
^
0_0_21554669_22593.cpp:34:12: error: expected ';' before 'return'
0_0_21554669_22593.cpp: In function 'int Fa(int)':
0_0_21554669_22593.cpp:37:12: error: expected primary-expression before 'return'
return return fa[x] == x? x: fa[x] = Fa(fa[x]);
^
0_0_21554669_22593.cpp:37:12: error: expected ';' before 'return'
0_0_21554669_22593.cpp: In function 'int lca(int, int)':
0_0_21554669_22593.cpp:40:10: error: 'top' was not declared in this scope
for(;top[x]!=top[y];x=gfa[top[x]])
^
0_0_21554669_22593.cpp:43:12: error: 'd' was not declared in this scope
return d[x] < d[y]? x: y;
^
0_0_21554669_22593.cpp: In function 'void gogogo(int, int)':
0_0_21554669_22593.cpp:57:23: error: no matching function for call to 'merge(int&, int&)'
merge(x,gfa[x]);
^
0_0_21554669_22593.cpp:57:23: note: candidates are:
0_0_21554669_22593.cpp:45:6: note: void merge(int, int, int)
void merge(int x, int y, int w) {
^
0_0_21554669_22593.cpp:45:6: note: candidate expects 3 arguments, 2 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
from 0_0_21554669_22593.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4814:5: note: template<class _IIter1, class _IIter2, class _OIter, class _Compare> _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)
merge(_InputIterator1 __first1, _InputIterator1 __last1,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4814:5: note: template argument deduction/substitution failed:
0_0_21554669_22593.cpp:57:23: note: candidate expects 6 arguments, 2 provided
merge(x,gfa[x]);
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
from 0_0_21554669_22593.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4766:5: note: template<class _IIter1, class _IIter2, class _OIter> _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
merge(_InputIterator1 __first1, _InputIterator1 __last1,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4766:5: note: template argument deduction/substitution failed:
0_0_21554669_22593.cpp:57:23: note: candidate expects 5 arguments, 2 provided
merge(x,gfa[x]);
^
0_0_21554669_22593.cpp: In function 'int main()':
0_0_21554669_22593.cpp:82:24: error: 'cmp' was not declared in this scope
sort(e+1,e+m+1,cmp);
^
0_0_21554669_22593.cpp:87:33: error: no matching function for call to 'merge(int&, int&)'
merge(e[i].a, e[i].c);
^
0_0_21554669_22593.cpp:87:33: note: candidates are:
0_0_21554669_22593.cpp:45:6: note: void merge(int, int, int)
void merge(int x, int y, int w) {
^
0_0_21554669_22593.cpp:45:6: note: candidate expects 3 arguments, 2 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
from 0_0_21554669_22593.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4814:5: note: template<class _IIter1, class _IIter2, class _OIter, class _Compare> _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)
merge(_InputIterator1 __first1, _InputIterator1 __last1,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4814:5: note: template argument deduction/substitution failed:
0_0_21554669_22593.cpp:87:33: note: candidate expects 6 arguments, 2 provided
merge(e[i].a, e[i].c);
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
from 0_0_21554669_22593.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4766:5: note: template<class _IIter1, class _IIter2, class _OIter> _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
merge(_InputIterator1 __first1, _InputIterator1 __last1,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4766:5: note: template argument deduction/substitution failed:
0_0_21554669_22593.cpp:87:33: note: candidate expects 5 arguments, 2 provided
merge(e[i].a, e[i].c);
^
0_0_21554669_22593.cpp:92:13: error: 'size' was not declared in this scope
size[i] = deep[i] = gfa[i] = son[i] = top[i] = 0;
^
0_0_21554669_22593.cpp:92:42: error: 'son' was not declared in this scope
size[i] = deep[i] = gfa[i] = son[i] = top[i] = 0;
^
0_0_21554669_22593.cpp:92:51: error: 'top' was not declared in this scope
size[i] = deep[i] = gfa[i] = son[i] = top[i] = 0;
^
|