foo.cpp: In function 'int main()':
foo.cpp:29:41: error: no matching function for call to 'min(long long int, int&)'
ans=min(d[i][j]+a[i][k]+a[k][j],ans);
^
foo.cpp:29:41: note: candidates are:
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:193: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.8.1\include\c++\bits\stl_algobase.h:193:5: note: template argument deduction/substitution failed:
foo.cpp:29:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
ans=min(d[i][j]+a[i][k]+a[k][j],ans);
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:239: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.8.1\include\c++\bits\stl_algobase.h:239:5: note: template argument deduction/substitution failed:
foo.cpp:29:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
ans=min(d[i][j]+a[i][k]+a[k][j],ans);
^