QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#866918 | #9982. Staircase Museum | ucup-team3479 | Compile Error | / | / | C++20 | 929b | 2025-01-22 21:51:44 | 2025-01-22 21:51:45 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int32_t main()’: answer.code:36:21: error: no matching function for call to ‘min(int&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type)’ 36 | nx = min(nx, upper_bound(r.begin(), r.end(), r[x]) - r.begin()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’ 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: answer.code:36:21: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type’ {aka ‘long int’}) 36 | nx = min(nx, upper_bound(r.begin(), r.end(), r[x]) - r.begin()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’ 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5685:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’ 5685 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5685:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5695:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)’ 5695 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5695:5: note: template argument deduction/substitution failed: answer.code:36:21: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ 36 | nx = min(nx, upper_bound(r.begin(), r.end(), r[x]) - r.begin()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~