0_0_24857378_25007.cpp:7:25: error: 'edge' does not name a type
bool operator < (const edge &rhs) const {
^
0_0_24857378_25007.cpp: In member function 'bool Edge::operator<(const int&) const':
0_0_24857378_25007.cpp:8:18: error: request for member 'w' in 'rhs', which is of non-class type 'const int'
return w < rhs.w;
^
0_0_24857378_25007.cpp: In function 'void init(int)':
0_0_24857378_25007.cpp:16:3: error: 'fa' was not declared in this scope
fa[i]=i;
^
0_0_24857378_25007.cpp: In function 'int find(int)':
0_0_24857378_25007.cpp:19:24: error: 'fa' was not declared in this scope
int find(int x){return fa[x]=x==fa[x]?x:find(x);}
^
0_0_24857378_25007.cpp: At global scope:
0_0_24857378_25007.cpp:20:9: error: 'MAXN' was not declared in this scope
int fst[MAXN],to[MAXN<<1],len[MAXN<<1],nxt[MAXN<<1];
^
0_0_24857378_25007.cpp:20:18: error: 'MAXN' was not declared in this scope
int fst[MAXN],to[MAXN<<1],len[MAXN<<1],nxt[MAXN<<1];
^
0_0_24857378_25007.cpp:20:31: error: 'MAXN' was not declared in this scope
int fst[MAXN],to[MAXN<<1],len[MAXN<<1],nxt[MAXN<<1];
^
0_0_24857378_25007.cpp:20:44: error: 'MAXN' was not declared in this scope
int fst[MAXN],to[MAXN<<1],len[MAXN<<1],nxt[MAXN<<1];
^
0_0_24857378_25007.cpp: In function 'void add(Edge&)':
0_0_24857378_25007.cpp:24:2: error: 'to' was not declared in this scope
to[ecnt]=e.v;
^
0_0_24857378_25007.cpp:25:2: error: 'len' was not declared in this scope
len[ecnt]=e.w;
^
0_0_24857378_25007.cpp:26:2: error: 'nxt' was not declared in this scope
nxt[ecnt]=fst[e.u];
^
0_0_24857378_25007.cpp:26:12: error: 'fst' was not declared in this scope
nxt[ecnt]=fst[e.u];
^
0_0_24857378_25007.cpp: At global scope:
0_0_24857378_25007.cpp:29:6: error: 'MAXN' was not declared in this scope
LL s[MAXN],c[MAXN];
^
0_0_24857378_25007.cpp:29:14: error: 'MAXN' was not declared in this scope
LL s[MAXN],c[MAXN];
^
0_0_24857378_25007.cpp: In function 'void dfs(int, int)':
0_0_24857378_25007.cpp:32:12: error: 'fst' was not declared in this scope
for(int i=fst[u];i;i=nxt[i]){
^
0_0_24857378_25007.cpp:32:23: error: 'nxt' was not declared in this scope
for(int i=fst[u];i;i=nxt[i]){
^
0_0_24857378_25007.cpp:33:9: error: 'to' was not declared in this scope
int v=to[i];
^
0_0_24857378_25007.cpp:35:4: error: 's' was not declared in this scope
s[v]=len[i];
^
0_0_24857378_25007.cpp:35:9: error: 'len' was not declared in this scope
s[v]=len[i];
^
0_0_24857378_25007.cpp:37:4: error: 'c' was not declared in this scope
c[u]+=c[v];
^
0_0_24857378_25007.cpp:40:7: error: 's' was not declared in this scope
sum+=s[u]*c[u]*(n-c[u]);
^
0_0_24857378_25007.cpp:40:12: error: 'c' was not declared in this scope
sum+=s[u]*c[u]*(n-c[u]);
^
0_0_24857378_25007.cpp:40:18: error: 'n' was not declared in this scope
sum+=s[u]*c[u]*(n-c[u]);
^
0_0_24857378_25007.cpp: In function 'int main()':
0_0_24857378_25007.cpp:57:5: error: 'fa' was not declared in this scope
fa[u]=v;
^
0_0_24857378_25007.cpp:60:45: error: no matching function for call to 'Edge::Edge(int&)'
add((Edge)(edge[i].v,edge[i].u,edge[i].w));
^
0_0_24857378_25007.cpp:60:45: note: candidates are:
0_0_24857378_25007.cpp:5:8: note: Edge::Edge()
struct Edge{
^
0_0_24857378_25007.cpp:5:8: note: candidate expects 0 arguments, 1 provided
0_0_24857378_25007.cpp:5:8: note: constexpr Edge::Edge(const Edge&)
0_0_24857378_25007.cpp:5:8: note: no known conversion for argument 1 from 'int' to 'const Edge&'
0_0_24857378_25007.cpp:5:8: note: constexpr Edge::Edge(Edge&&)
0_0_24857378_25007.cpp:5:8: note: no known conversion for argument 1 from 'int' to 'Edge&&'
0_0_24857378_25007.cpp:64:10: error: 'c' was not declared in this scope
memset(c,0,sizeof(c));
^
0_0_24857378_25007.cpp:65:3: error: 's' was not declared in this scope
s[1]=0;
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_24857378_25007.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = Edge*; _Iterator2 = Edge*]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1846:27: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = Edge*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1884:70: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = Edge*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1970:55: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = Edge*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4685:72: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = Edge*]'
0_0_24857378_25007.cpp:51:23: required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:42:23: error: no match for 'operator<' (operand types are 'Edge' and 'Edge')
{ return *__it1 < *__it2; }
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:42:23: note: candidates are:
0_0_24857378_25007.cpp:7:7: note: bool Edge::operator<(const int&) const
bool operator < (const edge &rhs) const {
^
0_0_24857378_25007.cpp:7:7: note: no known conversion for argument 1 from 'Edge' to 'const int&'
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++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_24857378_25007.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:837:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool __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:837:5: note: template argument deduction/substitution failed:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_24857378_25007.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:42:23: note: 'Edge' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
{ return *__it1 < *__it2; }
^
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++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.
|