/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void dij()':
foo.cc:51:41: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
   51 |                         q.push(mkpii(d[v], v));
      |                                      ~~~^
In file included from /nix/store/zzjv1aqla1y9vzn1m1w6qbclacqg9x08-gcc/include/c++/12.2.0/bits/stl_algobase.h:64,
                 from /nix/store/zzjv1aqla1y9vzn1m1w6qbclacqg9x08-gcc/include/c++/12.2.0/string:50,
                 from foo.cc:4:
/nix/store/zzjv1aqla1y9vzn1m1w6qbclacqg9x08-gcc/include/c++/12.2.0/bits/stl_pair.h:741:21: note:   initializing argument 1 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = int; _T2 = int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = int; typename decay<_Tp2>::type = int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = int; typename decay<_Tp>::type = int]'
  741 |     make_pair(_T1&& __x, _T2&& __y)
      |               ~~~~~~^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1006 晴天小猪历险记之Hill
语言
C++
递交时间
2023-05-11 22:08:14
评测时间
2023-05-11 22:08:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes