Submission #00104
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:27:31: error: no matching function for call to ‘max(lli&, int)’
ans = max(ans, i-j);
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
./Main.cpp:27:31: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
ans = max(ans, i-j);
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
./Main.cpp:27:31: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
ans = max(ans, i-j);
^
セット
テストケース