QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#856258 | #9557. Temperance | HuangHanSheng | Compile Error | / | / | C++20 | 784b | 2025-01-13 19:56:29 | 2025-01-13 19:56:31 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:17:17: error: ‘std::map<int, int> y1’ redeclared as different kind of entity 17 | map<int,int> x1,y1,z1; | ^~ In file included from /usr/include/features.h:502, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:680, from /usr/include/c++/14/bits/requires_hosted.h:31, from /usr/include/c++/14/iostream:38, from answer.code:1: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:224:1: note: previous declaration ‘double y1(double)’ 224 | __MATHCALL (y1,, (_Mdouble_)); | ^~~~~~~~~~ answer.code: In function ‘int main()’: answer.code:31:32: warning: pointer to a function used in arithmetic [-Wpointer-arith] 31 | y1[y[i]]++; | ^ answer.code:31:32: warning: ISO C++ forbids incrementing a pointer of type ‘double (*)(double) noexcept’ [-Wpointer-arith] 31 | y1[y[i]]++; | ~~~~~~~^ answer.code:31:32: error: lvalue required as increment operand 31 | y1[y[i]]++; | ^ answer.code:35:34: error: ‘p’ was not declared in this scope 35 | s[max({x[p[i].x],y[p[i].y],z[p[i].z]})]++; | ^ answer.code:35:30: error: no matching function for call to ‘max(<brace-enclosed initializer list>)’ 35 | s[max({x[p[i].x],y[p[i].y],z[p[i].z]})]++; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’ 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’ 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:61, from answer.code:5: /usr/include/c++/14/bits/stl_algo.h:5705:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)’ 5705 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5705:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:5715:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)’ 5715 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5715:5: note: candidate expects 2 arguments, 1 provided answer.code:43:20: error: request for member ‘clear’ in ‘y1’, which is of non-class type ‘double(double) noexcept’ 43 | y1.clear(); | ^~~~~