QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#476847#8650. Island Hoppingegypt_ioi2024b_05#Compile Error//C++202.4kb2024-07-13 21:13:202024-07-13 21:13:21

详细

answer.code: In function ‘void solve(int, int)’:
answer.code:119:34: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(int, int&)’
  119 |     for(int& i : o){ans.push_back(1,i);vis[i] = 1;}
      |                     ~~~~~~~~~~~~~^~~~~
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:12:
/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:7: note:   candidate expects 1 argument, 2 provided
/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:7: note:   candidate expects 1 argument, 2 provided