foo.cpp: In function 'void spfa()':
foo.cpp:64:48: error: no matching function for call to 'min(int&, __gnu_cxx::__enable_if<true, double>::__type)'
foo.cpp:64:48: note: candidates are:
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algobase.h:187:39: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algobase.h:233:56: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)