QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#472153 | #4925. Adjacent Pairs | HuangHanSheng | Compile Error | / | / | C++98 | 929b | 2024-07-11 14:45:04 | 2024-07-11 14:45:05 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int main()’: answer.code:25:17: warning: lambda expressions only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 25 | }); | ^ answer.code:22:21: error: no matching function for call to ‘sort(int*, int*, main()::<lambda(int, int)>)’ 22 | sort(id+1,id+n+1,[&](int x, int y) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | return c2[x]>c2[y]; | ~~~~~~~~~~~~~~~~~~~ 25 | }); | ~~ In file included from /usr/include/c++/13/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/bits/stl_algo.h:4851:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’ 4851 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ^~~~ /usr/include/c++/13/bits/stl_algo.h:4851:5: note: template argument deduction/substitution failed: answer.code:22:21: note: candidate expects 2 arguments, 3 provided 22 | sort(id+1,id+n+1,[&](int x, int y) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | return c2[x]>c2[y]; | ~~~~~~~~~~~~~~~~~~~ 25 | }); | ~~ /usr/include/c++/13/bits/stl_algo.h:4882:5: note: candidate: ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ 4882 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~ /usr/include/c++/13/bits/stl_algo.h:4882:5: note: template argument deduction/substitution failed: answer.code: In substitution of ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = main()::<lambda(int, int)>]’: answer.code:22:7: required from here answer.code:22:21: error: template argument for ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ uses local type ‘main()::<lambda(int, int)>’ 22 | sort(id+1,id+n+1,[&](int x, int y) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | return c2[x]>c2[y]; | ~~~~~~~~~~~~~~~~~~~ 25 | }); | ~~ answer.code:22:21: error: trying to instantiate ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ answer.code:41:28: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 41 | mp[{x,y}]+=r-l+1>>1; | ^ answer.code:41:33: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 41 | mp[{x,y}]+=r-l+1>>1; | ^ answer.code:49:52: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 49 | ans=max(ans,c1[y]+c2[x]-mp[{x, y}]); | ^ answer.code:49:58: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 49 | ans=max(ans,c1[y]+c2[x]-mp[{x, y}]); | ^ answer.code:54:34: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 54 | while(mp[{id[t],i}]||i==id[t]) | ^ answer.code:54:43: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 54 | while(mp[{id[t],i}]||i==id[t]) | ^