QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#472133 | #4925. Adjacent Pairs | ZhaoZiLong | Compile Error | / | / | C++98 | 911b | 2024-07-11 14:40:41 | 2024-07-11 14:40:42 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘void solve()’: answer.code:21:9: warning: lambda expressions only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 21 | }); | ^ answer.code:18:13: error: no matching function for call to ‘sort(int*, int*, solve()::<lambda(int, int)>)’ 18 | sort(id+1,id+n+1,[&](int x, int y) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | { | ~ 20 | return c2[x]>c2[y]; | ~~~~~~~~~~~~~~~~~~~ 21 | }); | ~~ 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:18:13: note: candidate expects 2 arguments, 3 provided 18 | sort(id+1,id+n+1,[&](int x, int y) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | { | ~ 20 | return c2[x]>c2[y]; | ~~~~~~~~~~~~~~~~~~~ 21 | }); | ~~ /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 = solve()::<lambda(int, int)>]’: answer.code:18:6: required from here answer.code:18:13: error: template argument for ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ uses local type ‘solve()::<lambda(int, int)>’ 18 | sort(id+1,id+n+1,[&](int x, int y) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | { | ~ 20 | return c2[x]>c2[y]; | ~~~~~~~~~~~~~~~~~~~ 21 | }); | ~~ answer.code:18:13: error: trying to instantiate ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ answer.code:37:20: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 37 | mp[{x,y}]+=(r-l+1)>>1; | ^ answer.code:37:25: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 37 | mp[{x,y}]+=(r-l+1)>>1; | ^ answer.code:45:44: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 45 | ans=max(ans,c1[y]+c2[x]-mp[{x, y}]); | ^ answer.code:45:50: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 45 | ans=max(ans,c1[y]+c2[x]-mp[{x, y}]); | ^ answer.code:50:26: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 50 | while(mp[{id[t],i}]||i==id[t]) | ^ answer.code:50:35: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 50 | while(mp[{id[t],i}]||i==id[t]) | ^