Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

1_645_1667_20072.cpp: In member function 'void Dijkstra::AddEdge(int, int, int)':
1_645_1667_20072.cpp:50:35: error: no match for 'operator!=' (operand types are 'std::pair<int, int>' and 'int')
   if(edges.find(make_pair(from,to)!=-1))
                                   ^
1_645_1667_20072.cpp:50:35: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/utility:70:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:60,
                 from 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:227: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:227:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
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++/algorithm:61,
                 from 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:304: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:304:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
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++/algorithm:61,
                 from 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:354:5: note: template<class _IteratorL, class _IteratorR> bool 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:354:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::reverse_iterator<_Iterator>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
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++/algorithm:61,
                 from 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:1060:5: note: template<class _IteratorL, class _IteratorR> bool 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:1060:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::move_iterator<_Iterator>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
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++/algorithm:61,
                 from 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:1066:5: note: template<class _Iterator> bool 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:1066:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::move_iterator<_Iterator>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:40:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:40,
                 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 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/postypes.h:221:5: note: template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/postypes.h:221:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::fpos<_StateT>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:41:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:40,
                 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 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/allocator.h:138:5: note: template<class _T1, class _T2> bool std::operator!=(const std::allocator<_Tp>&, const std::allocator<_Tp>&)
     operator!=(const allocator<_T1>&, const allocator<_T2>&)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/allocator.h:138:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::allocator<_Tp>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:41:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:40,
                 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 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/allocator.h:143:5: note: template<class _Tp> bool std::operator!=(const std::allocator<_Tp>&, const std::allocator<_Tp>&)
     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/allocator.h:143:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::allocator<_Tp>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:40,
                 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 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2551:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2551:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   'std::pair<int, int>' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:40,
                 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 1_645_1667_20072.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2563:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator!=(const _CharT* __lhs,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2563:5: note:   template argument deduction/substitution failed:
1_645_1667_20072.cpp:50:38: note:   mismatched types 'const _CharT*' and 'std::pair<int, int>'
   if(edges.find(make_pair(from,to)!=-1))
                                      ^
In file included from GCC4.9.2/x86_6


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-09-28 00:23:59, Gzip enabled