QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#830749 | #9222. Price Combo | MaMengQi | Compile Error | / | / | C++11 | 3.3kb | 2024-12-24 22:25:39 | 2024-12-24 22:25:39 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int main()’: answer.code:101:32: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 101 | sort(a + 1, a + n + 1, [&](auto x, auto y) { | ^~~~ answer.code:101:40: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 101 | sort(a + 1, a + n + 1, [&](auto x, auto y) { | ^~~~ answer.code: In lambda function: answer.code:102:18: error: request for member ‘second’ in ‘x’, which is of non-class type ‘int’ 102 | return x.second != y.second ? x.second > y.second : x.first > y.first; | ^~~~~~ answer.code:102:30: error: request for member ‘second’ in ‘y’, which is of non-class type ‘int’ 102 | return x.second != y.second ? x.second > y.second : x.first > y.first; | ^~~~~~ answer.code:102:41: error: request for member ‘second’ in ‘x’, which is of non-class type ‘int’ 102 | return x.second != y.second ? x.second > y.second : x.first > y.first; | ^~~~~~ answer.code:102:52: error: request for member ‘second’ in ‘y’, which is of non-class type ‘int’ 102 | return x.second != y.second ? x.second > y.second : x.first > y.first; | ^~~~~~ answer.code:102:63: error: request for member ‘first’ in ‘x’, which is of non-class type ‘int’ 102 | return x.second != y.second ? x.second > y.second : x.first > y.first; | ^~~~~ answer.code:102:73: error: request for member ‘first’ in ‘y’, which is of non-class type ‘int’ 102 | return x.second != y.second ? x.second > y.second : x.first > y.first; | ^~~~~ answer.code: In function ‘int main()’: answer.code:104:11: error: could not convert ‘{{0, inf, inf, inf}, {0, 0}, 0}’ from ‘<brace-enclosed initializer list>’ to ‘Info’ 104 | modify(1, 1, lsh.size(), lsh.size(), {{0, inf, inf, inf}, {0, 0}, 0}); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | <brace-enclosed initializer list> answer.code:108:18: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘Tag’ 108 | res.apply({{a[i].second}, 1}); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ answer.code:24:20: note: initializing argument 1 of ‘void Info::apply(Tag)’ 24 | void apply(Tag y) { | ~~~~^ answer.code:109:17: error: could not convert ‘{{a[i].std::pair<int, int>::second}, 1}’ from ‘<brace-enclosed initializer list>’ to ‘Tag’ 109 | rangeAdd(1, 1, lsh.size(), 1, id, {{a[i].second}, 1}); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | <brace-enclosed initializer list> In file included from /usr/include/c++/13/bits/stl_algobase.h:71, from /usr/include/c++/13/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = std::pair<int, int>*; _Iterator2 = std::pair<int, int>*; _Compare = main()::<lambda(int, int)>]’: /usr/include/c++/13/bits/stl_algo.h:1819:14: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int, int)> >]’ /usr/include/c++/13/bits/stl_algo.h:1859:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int, int)> >]’ /usr/include/c++/13/bits/stl_algo.h:1950:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = pair<int, int>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int, int)> >]’ /usr/include/c++/13/bits/stl_algo.h:4894:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = pair<int, int>*; _Compare = main()::<lambda(int, int)>]’ answer.code:101:9: required from here /usr/include/c++/13/bits/predefined_ops.h:158:30: error: no match for call to ‘(main()::<lambda(int, int)>) (std::pair<int, int>&, std::pair<int, int>&)’ 158 | { return bool(_M_comp(*__it1, *__it2)); } | ~~~~~~~^~~~~~~~~~~~~~~~ answer.code:101:28: note: candidate: ‘main()::<lambda(int, int)>’ 101 | sort(a + 1, a + n + 1, [&](auto x, auto y) { | ...