answer.code:5:7: error: expected nested-name-specifier before ‘u64’
5 | using u64 = unsigned long long;
| ^~~
answer.code:6:7: error: expected nested-name-specifier before ‘u32’
6 | using u32 = unsigned int;
| ^~~
answer.code:7:7: error: expected nested-name-specifier before ‘i64’
7 | using i64 = long long;
| ^~~
answer.code:9:1: error: ‘mt19937_64’ does not name a type
9 | mt19937_64 rnd(random_device{}());
| ^~~~~~~~~~
answer.code:9:32: error: expected unqualified-id before ‘)’ token
9 | mt19937_64 rnd(random_device{}());
| ^
answer.code: In function ‘void RuinGuard(int)’:
answer.code:29:32: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
29 | vector<segment> seg(1, {0, 0, 0});
| ^
answer.code:29:41: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
29 | vector<segment> seg(1, {0, 0, 0});
| ^
answer.code:36:39: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
36 | seg.push_back({ll, rr, rr});
| ^
answer.code:36:38: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
36 | seg.push_back({ll, rr, rr});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~
answer.code:38:39: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
38 | seg.push_back({ll, rr, ll});
| ^
answer.code:38:38: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
38 | seg.push_back({ll, rr, ll});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~
answer.code:40:39: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
40 | seg.push_back({ll, rr, min(ll, rr)});
| ^
answer.code:40:38: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
40 | seg.push_back({ll, rr, min(ll, rr)});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
answer.code:46:9: warning: lambda expressions only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
46 | });
| ^
answer.code:44:13: error: no matching function for call to ‘sort(__gnu_cxx::__normal_iterator<segment*, std::vector<segment> >, std::vector<segment>::iterator, RuinGuard(int)::<lambda(segment&, segment&)>)’
44 | sort(seg.begin() + 1, seg.end(), [&](segment& a, segment& b) -> bool {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45 | return a.min < b.min;
| ~~~~~~~~~~~~~~~~~~~~~
46 | });
| ~~
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:2:
/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:44:13: note: candidate expects 2 arguments, 3 provided
44 | sort(seg.begin() + 1, seg.end(), [&](segment& a, segment& b) -> bool {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45 | return a.min < b.min;
| ~~~~~~~~~~~~~~~~~~~~~
46 | });
| ~~
/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 = __gnu_cxx::__normal_iterator<segment*, std::vector<segment> >; _Compare = RuinGuard(int)::<lambda(segment&, segment&)>]’:
answer.code:44:6: required from here
answer.code:44:13: error: template argument for ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ uses local type ‘RuinGuard(int)::<lambda(segment&, segment&)>’
44 | sort(seg.beg...