Borderou de evaluare (job #1511666)
Utilizator | Data | 26 octombrie 2015 23:52:04 | |
---|---|---|---|
Problema | Infasuratoare convexa | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:57:27: warning: capture of variable ‘pts’ with non-automatic storage duration [enabled by default]
sort(hull, hull + k, [pts](int ptId1, int ptId2) {
^
user.cpp:17:7: note: ‘point pts [120000]’ declared here
point pts[MAXN];
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:3:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = std::pair<double, double>*; _Tp = std::pair<double, double>; _Compare = main()::__lambda0]’:
/usr/include/c++/4.8/bits/stl_algo.h:2319:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::pair<double, double>*; _Compare = main()::__lambda0]’
/usr/include/c++/4.8/bits/stl_algo.h:2360:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = std::pair<double, double>*; _Size = int; _Compare = main()::__lambda0]’
/usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::pair<double, double>*; _Compare = main()::__lambda0]’
user.cpp:42:6: required from here
/usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: no match for call to ‘(main()::__lambda0) (std::pair<double, double>&, const std::pair<double, double>&)’
while (__comp(*__first, __pivot))
^
user.cpp:40:41: note: candidate is:
sort(pts + 1, pts + n, [&O = pts[0]](point &A, point &B) {
^
user.cpp:40:61: note: main()::__lambda0
sort(pts + 1, pts + n, [&O = pts[0]](point &A, point &B) {
^
user.cpp:40:61: note: no known conversion for argument 2 from ‘const std::pair<double, double>’ to ‘point& {aka std::pair<double, double>&}’
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:3:
/usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: no match for call to ‘(main()::__lambda0) (const std::pair<double, double>&, std::pair<double, double>&)’
while (__comp(__pivot, *__last))
^
user.cpp:40:41: note: candidate is:
sort(pts + 1, pts + n, [&O = pts[0]](point &A, point &B) {
^
user.cpp:40:61: note: main()::__lambda0
sort(pts + 1, pts + n, [&O = pts[0]](point &A, point &B) {
^
user.cpp:40:61: note: no known conversion for argument 1 from ‘const std::pair<double, double>’ to ‘point& {aka std::pair<double, double>&}’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !