event2.cpp: In function 'int main()':
event2.cpp:18:56: error: 'class std::vector<int>' has no member named 'pb'
18 | for(int i = 1; i <= n; i++) cin >> L[i] >> R[i], v.pb(L[i]), v.pb(R[i]);
| ^~
event2.cpp:18:68: error: 'class std::vector<int>' has no member named 'pb'
18 | for(int i = 1; i <= n; i++) cin >> L[i] >> R[i], v.pb(L[i]), v.pb(R[i]);
| ^~
event2.cpp:19:26: error: no matching function for call to 'sort(std::vector<int>::iterator, <unresolved overloaded function type>)'
19 | sort(v.begin(), v.end); v.erase(unique(v.begin(), v.end()), v.end());
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from event2.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:4849:5: note: candidate: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
4849 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/10/bits/stl_algo.h:4849:63: note: no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
4849 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/10/bits/stl_algo.h:4880:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
4880 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
| ^~~~
/usr/include/c++/10/bits/stl_algo.h:4880:5: note: template argument deduction/substitution failed:
event2.cpp:19:26: note: candidate expects 3 arguments, 2 provided
19 | sort(v.begin(), v.end); v.erase(unique(v.begin(), v.end()), v.end());
| ^
In file included from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from event2.cpp:1:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
| ^~~~
/usr/include/c++/10/pstl/glue_algorithm_defs.h:292:1: note: template argument deduction/substitution failed:
event2.cpp:19:26: note: candidate expects 4 arguments, 2 provided
19 | sort(v.begin(), v.end); v.erase(unique(v.begin(), v.end()), v.end());
| ^
In file included from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from event2.cpp:1:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
/usr/include/c++/10/pstl/glue_algorithm_defs.h:296:1: note: template argument deduction/substitution failed:
event2.cpp:19:26: note: candidate expects 3 arguments, 2 provided
19 | sort(v.begin(), v.end); v.erase(unique(v.begin(), v.end()), v.end());
| ^
event2.cpp:23:28: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
23 | L[i] = lower_bound(all(v),L[i])-begin(v);
| ^~~
| std::filesystem::perms::all
In file included from /usr/include/c++/10/filesystem:44,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from event2.cpp:1:
/usr/include/c++/10/bits/fs_fwd.h:148:7: note: 'std::filesystem::perms::all' declared here
148 | all = 0777,
| ^~~
event2.cpp:40:24: warning: comparison of integer expressions of different signedness: 'std::set<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
40 | if(S.size()==k+2) break;
| ~~~~~~~~^~~~~