roads.cpp: In function 'void adauga(long double, long double)':
roads.cpp:67:24: error: invalid types 'segment [100001][long double]' for array subscript
67 | segment first = sgt[a];
| ^
roads.cpp:68:25: error: invalid types 'segment [100001][long double]' for array subscript
68 | segment second = sgt[b];
| ^
roads.cpp: In member function 'bool ura::operator<(ura) const':
roads.cpp:94:23: error: invalid types 'segment [100001][const long double]' for array subscript
94 | return sgt[second].gety() < a.first;
| ^
roads.cpp:97:31: error: invalid types 'segment [100001][const long double]' for array subscript
97 | return first < sgt[a.second].gety();
| ^
roads.cpp:99:19: error: invalid types 'segment [100001][const long double]' for array subscript
99 | return sgt[second].gety() < sgt[a.second].gety();
| ^
roads.cpp:99:40: error: invalid types 'segment [100001][const long double]' for array subscript
99 | return sgt[second].gety() < sgt[a.second].gety();
| ^
roads.cpp: In function 'int main()':
roads.cpp:121:12: error: invalid types 'segment [100001][long double]' for array subscript
121 | sgt[i] = {a, b, c, d, i};
| ^
roads.cpp:128:8: error: invalid types 'segment [100001][long double]' for array subscript
128 | sgt[n - 1] = {-INF, -INF, INF, -INF, n - 1};
| ^
roads.cpp:131:8: error: invalid types 'segment [100001][long double]' for array subscript
131 | sgt[n] = {-INF, INF, INF, INF, n};
| ^
roads.cpp:149:51: error: invalid types 'segment [100001][long double]' for array subscript
149 | auto sus = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
roads.cpp:149:81: error: no matching function for call to 'std::set<ura>::lower_bound(<brace-enclosed initializer list>)'
149 | auto sus = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from roads.cpp:1:
/usr/include/c++/10/bits/stl_set.h:829:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<ura, ura, std::_Identity<ura>, std::less<ura>, std::allocator<ura> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = ura]'
829 | lower_bound(const key_type& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:829:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const ura&'}
829 | lower_bound(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:833:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) const [with _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<ura, ura, std::_Identity<ura>, std::less<ura>, std::allocator<ura> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = ura]'
833 | lower_bound(const key_type& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:833:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const ura&'}
833 | lower_bound(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:839:2: note: candidate: 'template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::iterator)(((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) [with _Kt = _Kt; _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>]'
839 | lower_bound(const _Kt& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:839:2: note: template argument deduction/substitution failed:
roads.cpp:149:81: note: couldn't deduce template parameter '_Kt'
149 | auto sus = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from roads.cpp:1:
/usr/include/c++/10/bits/stl_set.h:845:2: note: candidate: 'template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::const_iterator)(((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) const [with _Kt = _Kt; _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>]'
845 | lower_bound(const _Kt& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:845:2: note: template argument deduction/substitution failed:
roads.cpp:149:81: note: couldn't deduce template parameter '_Kt'
149 | auto sus = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
roads.cpp:151:51: error: invalid types 'segment [100001][long double]' for array subscript
151 | auto jos = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
roads.cpp:151:81: error: no matching function for call to 'std::set<ura>::lower_bound(<brace-enclosed initializer list>)'
151 | auto jos = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from roads.cpp:1:
/usr/include/c++/10/bits/stl_set.h:829:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<ura, ura, std::_Identity<ura>, std::less<ura>, std::allocator<ura> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = ura]'
829 | lower_bound(const key_type& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:829:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const ura&'}
829 | lower_bound(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:833:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) const [with _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<ura, ura, std::_Identity<ura>, std::less<ura>, std::allocator<ura> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = ura]'
833 | lower_bound(const key_type& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:833:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const ura&'}
833 | lower_bound(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:839:2: note: candidate: 'template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::iterator)(((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) [with _Kt = _Kt; _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>]'
839 | lower_bound(const _Kt& __x)
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:839:2: note: template argument deduction/substitution failed:
roads.cpp:151:81: note: couldn't deduce template parameter '_Kt'
151 | auto jos = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from roads.cpp:1:
/usr/include/c++/10/bits/stl_set.h:845:2: note: candidate: 'template<class _Kt> decltype ((std::set<_Key, _Compare, _Alloc>::const_iterator)(((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::set<_Key, _Compare, _Alloc>::lower_bound(const _Kt&) const [with _Kt = _Kt; _Key = ura; _Compare = std::less<ura>; _Alloc = std::allocator<ura>]'
845 | lower_bound(const _Kt& __x) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:845:2: note: template argument deduction/substitution failed:
roads.cpp:151:81: note: couldn't deduce template parameter '_Kt'
151 | auto jos = active.lower_bound({sgt[-events[i].stare].gety(), -1});
| ^
roads.cpp:178:27: error: invalid types 'segment [100001][long double]' for array subscript
178 | if(sgt[indS].a != -INF) {
| ^
roads.cpp:180:34: error: invalid types 'segment [100001][long double]' for array subscript
180 | } else if(sgt[indJ].a != -INF) {
| ^