/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:10:15: error: no matching function for call to 'min(ll&, int&)'
  ll mx=min(n,m);
               ^
foo.cpp:10:15: note: candidates are:
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/char_traits.h:39:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
                 from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
foo.cpp:10:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
  ll mx=min(n,m);
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/char_traits.h:39:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
                 from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
foo.cpp:10:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
  ll mx=min(n,m);
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62:0,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:3439:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
     min(initializer_list<_Tp> __l)
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:3439:5: note:   template argument deduction/substitution failed:
foo.cpp:10:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
  ll mx=min(n,m);
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62:0,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:3444:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:3444:5: note:   template argument deduction/substitution failed:
foo.cpp:10:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
  ll mx=min(n,m);
               ^

信息

递交者
类型
递交
题目
P1964 夜夜的NOIP之旅
语言
C++
递交时间
2015-10-25 14:52:49
评测时间
2015-10-25 14:52:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes