QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#464232 | #7516. Robot Experiment | ucup-team3884# | Compile Error | / | / | C++20 | 1.2kb | 2024-07-05 22:57:02 | 2024-07-05 22:57:02 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘void solve()’: answer.code:53:36: error: no matching function for call to ‘std::vector<std::pair<int, int> >::emplace(int&, int&)’ 53 | if (ok) res.emplace(x, y); | ~~~~~~~~~~~^~~~~~ 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:1: /usr/include/c++/13/bits/stl_vector.h:1343:9: note: candidate: ‘template<class ... _Args> constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::emplace(const_iterator, _Args&& ...) [with _Args = {_Args ...}; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]’ 1343 | emplace(const_iterator __position, _Args&&... __args) | ^~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1343:9: note: template argument deduction/substitution failed: answer.code:53:37: note: cannot convert ‘x’ (type ‘int’) to type ‘std::vector<std::pair<int, int> >::const_iterator’ 53 | if (ok) res.emplace(x, y); | ^