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_18218253_29834.cpp: In function 'void add_edge(int, int, int)':
0_0_18218253_29834.cpp:11:47: error: no matching function for call to 'std::vector<int>::push_back(edge)'
  G[from].push_back(edge{to, cap, G[to].size()});
                                               ^
0_0_18218253_29834.cpp:11:47: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_18218253_29834.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
       push_back(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note:   no known conversion for argument 1 from 'edge' to 'const value_type& {aka const int&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
       push_back(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note:   no known conversion for argument 1 from 'edge' to 'std::vector<int>::value_type&& {aka int&&}'
0_0_18218253_29834.cpp:12:49: error: no matching function for call to 'std::vector<int>::push_back(edge)'
  G[to].push_back(edge{from, 0, G[from].size()-1});
                                                 ^
0_0_18218253_29834.cpp:12:49: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_18218253_29834.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
       push_back(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note:   no known conversion for argument 1 from 'edge' to 'const value_type& {aka const int&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
       push_back(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note:   no known conversion for argument 1 from 'edge' to 'std::vector<int>::value_type&& {aka int&&}'
0_0_18218253_29834.cpp: In function 'int dfs(int, int, int)':
0_0_18218253_29834.cpp:19:19: error: invalid initialization of reference of type 'edge&' from expression of type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
   edge &e = G[v][i];
                   ^
0_0_18218253_29834.cpp:21:37: error: 'min' was not declared in this scope
    int d = dfs(e.to, t, min(f, e.cap));
                                     ^
0_0_18218253_29834.cpp:21:37: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_18218253_29834.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3444:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_18218253_29834.cpp:24:20: error: request for member 'cap' in 'G[e.edge::to].std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)e.edge::rev))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
     G[e.to][e.rev].cap += d;
                    ^
0_0_18218253_29834.cpp: In function 'int max_flow(int, int)':
0_0_18218253_29834.cpp:36:21: error: 'INF' was not declared in this scope
   int f = dfs(s, t, INF);
                     ^


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-12-02 18:54:35, Gzip enabled