记录详情

Compile Error

foo.cc: In function 'void dij()':
foo.cc:51:24: error: no matching function for call to 'make_pair<int, int>(int&, int&)'
    q.push(mkpii(d[v], v));
                        ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from foo.cc:4:
/usr/include/c++/7/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
foo.cc:51:20: note:   cannot convert 'd[v]' (type 'int') to type 'int&&'
    q.push(mkpii(d[v], v));
                 ~~~^

自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)

信息

递交者
类型
递交
题目
P1173 晴天小猪历险记之Number
语言
C++
递交时间
2020-07-29 22:59:08
评测时间
2020-07-29 22:59:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes