Borderou de evaluare (job #1696473)
Utilizator | Vintur Cristian Cristian1997 | Data | 29 aprilie 2016 11:16:34 |
---|---|---|---|
Problema | Avioane2 | Status | done |
Runda | Arhiva ICPC | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:39:12: warning: variable ‘last_time’ set but not used [-Wunused-but-set-variable]
int i, n, last_time;
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<_event*, std::vector<_event> >; _Tp = _event; _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 = __gnu_cxx::__normal_iterator<_event*, std::vector<_event> >; _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 = __gnu_cxx::__normal_iterator<_event*, std::vector<_event> >; _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 = __gnu_cxx::__normal_iterator<_event*, std::vector<_event> >; _Compare = main()::__lambda0]’
user.cpp:46:96: required from here
/usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: no match for call to ‘(main()::__lambda0) (_event&, const _event&)’
while (__comp(*__first, __pivot))
^
user.cpp:46:38: note: candidates are:
sort(events.begin(), events.end(), [](_event &a, _event &b) -> bool {return a.time < b.time; });
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_algo.h:2287:35: note: bool (*)(_event&, _event&) <conversion>
while (__comp(*__first, __pivot))
^
/usr/include/c++/4.8/bits/stl_algo.h:2287:35: note: candidate expects 3 arguments, 3 provided
user.cpp:46:65: note: main()::__lambda0
sort(events.begin(), events.end(), [](_event &a, _event &b) -> bool {return a.time < b.time; });
^
user.cpp:46:65: note: no known conversion for argument 2 from ‘const _event’ to ‘_event&’
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: no match for call to ‘(main()::__lambda0) (const _event&, _event&)’
while (__comp(__pivot, *__last))
^
user.cpp:46:38: note: candidates are:
sort(events.begin(), events.end(), [](_event &a, _event &b) -> bool {return a.time < b.time; });
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_algo.h:2290:34: note: bool (*)(_event&, _event&) <conversion>
while (__comp(__pivot, *__last))
^
/usr/include/c++/4.8/bits/stl_algo.h:2290:34: note: candidate expects 3 arguments, 3 provided
user.cpp:46:65: note: main()::__lambda0
sort(events.begin(), events.end(), [](_event &a, _event &b) -> bool {return a.time < b.time; });
^
user.cpp:46:65: note: no known conversion for argument 1 from ‘const _event’ to ‘_event&’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !