Problem pilot
User abcde271828
Submission Time 2026-03-12 00:37:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pilot.cpp: In function ‘int32_t main()’:
pilot.cpp:52:29: error: use of ‘prev’ before deduction of ‘auto’
52 | auto prev = prev(it);
| ^~~~
pilot.cpp:55:53: error: no matching function for call to ‘std::set<std::pair<long long int, long long int> >::insert(<brace-enclosed initializer list>)’
55 | intervals.insert({prev->first,h});
| ^
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from pilot.cpp:1:
/usr/include/c++/9/bits/stl_set.h:509:7: note: candidate: ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&)