F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_31456521_32692.cpp:27:12: error: redefinition of 'struct MCMF::node'
     struct node{
            ^
0_0_31456521_32692.cpp:11:12: error: previous definition of 'struct MCMF::node'
     struct node{
            ^
0_0_31456521_32692.cpp:33:8: error: invalid type in declaration before ';' token
     }ex;
        ^
0_0_31456521_32692.cpp: In function 'bool MCMF::spfa(int, int)':
0_0_31456521_32692.cpp:41:24: error: no matching function for call to 'MCMF::node::node(int&, int)'
         q.push(node(s,0));  dis[s]=0;   pre[t]=-1;
                        ^
0_0_31456521_32692.cpp:41:24: note: candidates are:
0_0_31456521_32692.cpp:11:12: note: MCMF::node::node()
     struct node{
            ^
0_0_31456521_32692.cpp:11:12: note:   candidate expects 0 arguments, 2 provided
0_0_31456521_32692.cpp:11:12: note: constexpr MCMF::node::node(const MCMF::node&)
0_0_31456521_32692.cpp:11:12: note:   candidate expects 1 argument, 2 provided
0_0_31456521_32692.cpp:11:12: note: constexpr MCMF::node::node(MCMF::node&&)
0_0_31456521_32692.cpp:11:12: note:   candidate expects 1 argument, 2 provided
0_0_31456521_32692.cpp:43:15: error: cannot convert 'const value_type {aka const MCMF::node}' to 'int' in assignment
             ex=q.top();    q.pop();
               ^
0_0_31456521_32692.cpp:44:18: error: request for member 'u' in 'MCMF::ex', which is of non-class type 'int'
             u=ex.u;        w=ex.w;
                  ^
0_0_31456521_32692.cpp:44:33: error: request for member 'w' in 'MCMF::ex', which is of non-class type 'int'
             u=ex.u;        w=ex.w;
                                 ^
0_0_31456521_32692.cpp:52:43: error: no matching function for call to 'MCMF::node::node(int&, int&)'
                     q.push(node(tu,dis[tu]));
                                           ^
0_0_31456521_32692.cpp:52:43: note: candidates are:
0_0_31456521_32692.cpp:11:12: note: MCMF::node::node()
     struct node{
            ^
0_0_31456521_32692.cpp:11:12: note:   candidate expects 0 arguments, 2 provided
0_0_31456521_32692.cpp:11:12: note: constexpr MCMF::node::node(const MCMF::node&)
0_0_31456521_32692.cpp:11:12: note:   candidate expects 1 argument, 2 provided
0_0_31456521_32692.cpp:11:12: note: constexpr MCMF::node::node(MCMF::node&&)
0_0_31456521_32692.cpp:11:12: note:   candidate expects 1 argument, 2 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 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_31456521_32692.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h: In instantiation of 'bool std::greater<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = MCMF::node]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:121:46:   required from 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<MCMF::node*, std::vector<MCMF::node> >; _Iterator2 = __gnu_cxx::__normal_iterator<MCMF::node*, std::vector<MCMF::node> >; _Compare = std::greater<MCMF::node>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:216:37:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<MCMF::node*, std::vector<MCMF::node> >; _Distance = long long int; _Tp = MCMF::node; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<MCMF::node> >]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:334:15:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<MCMF::node*, std::vector<MCMF::node> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<MCMF::node> >]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:385:52:   required from 'void std::make_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<MCMF::node*, std::vector<MCMF::node> >; _Compare = std::greater<MCMF::node>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:414:48:   required from 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&) [with _Tp = MCMF::node; _Sequence = std::vector<MCMF::node>; _Compare = std::greater<MCMF::node>]'
0_0_31456521_32692.cpp:39:60:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:362:20: error: no match for 'operator>' (operand types are 'const MCMF::node' and 'const MCMF::node')
       { return __x > __y; }
                    ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:362:20: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64: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_31456521_32692.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:233:5: note: template<class _T1, class _T2> constexpr bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:233:5: note:   template argument deduction/substitution failed:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 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_31456521_32692.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:362:20: note:   'const MCMF::node' is not derived from 'const std::pair<_T1, _T2>'
       { return __x > __y; }
                    ^
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_31456521_32692.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:310:5: note: template<class _Iterator> bool 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:310:5: note:   template argument deduction/substitution failed:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 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,
                


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 22:38:15, Gzip enabled