QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#456613#2214. Link Cut Digraphegypt_ioi2024_12Compile Error//C++234.9kb2024-06-28 09:26:002024-06-28 09:26:00

Details

answer.code: In member function ‘bool DSU::unite(int, int)’:
answer.code:65:26: error: no matching function for call to ‘std::vector<std::pair<int&, int> >::push_back(<brace-enclosed initializer list>)’
   65 |         history.push_back({pairs,pairs});
      |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
                 from answer.code:5:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int&, int>; _Alloc = std::allocator<std::pair<int&, int> >; value_type = std::pair<int&, int>]’
 1278 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::pair<int&, int> >::value_type&’ {aka ‘const std::pair<int&, int>&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<int&, int>; _Alloc = std::allocator<std::pair<int&, int> >; value_type = std::pair<int&, int>]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::pair<int&, int> >::value_type&&’ {aka ‘std::pair<int&, int>&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~