# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
218837 | 2020-04-02 20:01:52 | Vimmer | Matching (COCI20_matching) | C++14 | Compilation error | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <bits/stdc++.h>
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("-O3")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("fast-math")
//#pragma GCC optimize("no-stack-protector")
#define F first
#define S second
#define sz(x) int(x.size())
#define pb push_back
#define N 100001
using namespace std;
int x[N], y[N], a[N][2], b[N], n, xr[N], yr[N];
set <int> alone;
vector <pair <int, int> >ty_del[N * 4];
vector <pair <int, int> >psh_dely[N * 4];
bool mk[N], mkr[N][2];
vector <pair <int, int> > g;
void Push_dely(int v, int tl, int tr)
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
matching.cpp: In function 'void Push_dely(int, int, int)': matching.cpp:35:28: error: no matching function for call to 'std::vector<std::pair<int, int> >::insert(std::pair<int, int>&)' ty_del[v].insert(pt); ^ In file included from /usr/include/c++/7/vector:69:0, from /usr/include/c++/7/queue:61, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86, from matching.cpp:1: /usr/include/c++/7/bits/vector.tcc:114:5: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::pair<int, int>*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const std::pair<int, int>*; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/7/bits/vector.tcc:114:5: note: candidate expects 2 arguments, 1 provided In file included from /usr/include/c++/7/vector:64:0, from /usr/include/c++/7/queue:61, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86, from matching.cpp:1: /usr/include/c++/7/bits/stl_vector.h:1042:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::pair<int, int>*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const std::pair<int, int>*; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] insert(const_iterator __position, value_type&& __x) ^~~~~~ /usr/include/c++/7/bits/stl_vector.h:1042:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/7/bits/stl_vector.h:1059:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::initializer_list<_Tp>) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::pair<int, int>*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const std::pair<int, int>*] insert(const_iterator __position, initializer_list<value_type> __l) ^~~~~~ /usr/include/c++/7/bits/stl_vector.h:1059:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/7/bits/stl_vector.h:1084:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::pair<int, int>*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const std::pair<int, int>*, std::vector<std::pair<int, int> > >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const std::pair<int, int>*; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>] insert(const_iterator __position, size_type __n, const value_type& __x) ^~~~~~ /usr/include/c++/7/bits/stl_vector.h:1084:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/7/bits/stl_vector.h:1128:2: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >] insert(const_iterator __position, _InputIterator __first, ^~~~~~ /usr/include/c++/7/bits/stl_vector.h:1128:2: note: template argument deduction/substitution failed: matching.cpp:35:28: note: candidate expects 3 arguments, 1 provided ty_del[v].insert(pt); ^ matching.cpp: In function 'void good_del(int, int, int, int, int, int)': matching.cpp:69:24: error: 'class std::vector<std::pair<int, int> >' has no member named 'lower_bound' it = ty_del[v].lower_bound({l, -1e9}); ^~~~~~~~~~~ matching.cpp:71:19: error: no match for 'operator!=' (operand types are 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' and 'std::vector<std::pair<int, int> >::iterator {aka __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >}') while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/7/map:60:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81, from matching.cpp:1: /usr/include/c++/7/bits/stl_tree.h:398:7: note: candidate: bool std::_Rb_tree_const_iterator<_Tp>::operator!=(const _Self&) const [with _Tp = std::pair<int, int>; std::_Rb_tree_const_iterator<_Tp>::_Self = std::_Rb_tree_const_iterator<std::pair<int, int> >] operator!=(const _Self& __x) const _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/7/bits/stl_tree.h:398:7: note: no known conversion for argument 1 from 'std::vector<std::pair<int, int> >::iterator {aka __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >}' to 'const _Self& {aka const std::_Rb_tree_const_iterator<std::pair<int, int> >&}' In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:951:5: note: candidate: template<class _BiIter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&) operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) ^~~~~~~~ /usr/include/c++/7/bits/regex.h:951:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::__cxx11::sub_match<_BiIter>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1029:5: note: candidate: template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&) operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1029:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1109:5: note: candidate: template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&) operator!=(const sub_match<_Bi_iter>& __lhs, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1109:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::__cxx11::sub_match<_BiIter>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1186:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&) operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1186:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::vector<std::pair<int, int> >::iterator {aka __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >}' is not derived from 'const std::__cxx11::sub_match<_BiIter>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1260:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*) operator!=(const sub_match<_Bi_iter>& __lhs, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1260:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::__cxx11::sub_match<_BiIter>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1337:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&) operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1337:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::vector<std::pair<int, int> >::iterator {aka __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >}' is not derived from 'const std::__cxx11::sub_match<_BiIter>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1417:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&) operator!=(const sub_match<_Bi_iter>& __lhs, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1417:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::__cxx11::sub_match<_BiIter>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/regex:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110, from matching.cpp:1: /usr/include/c++/7/bits/regex.h:1944:5: note: candidate: template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const std::__cxx11::match_results<_BiIter, _Alloc>&, const std::__cxx11::match_results<_BiIter, _Alloc>&) operator!=(const match_results<_Bi_iter, _Alloc>& __m1, ^~~~~~~~ /usr/include/c++/7/bits/regex.h:1944:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/iosfwd:40:0, from /usr/include/c++/7/ios:38, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from matching.cpp:1: /usr/include/c++/7/bits/postypes.h:221:5: note: candidate: template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ^~~~~~~~ /usr/include/c++/7/bits/postypes.h:221:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::fpos<_StateT>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/ios:40, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from matching.cpp:1: /usr/include/c++/7/bits/stl_pair.h:456:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ^~~~~~~~ /usr/include/c++/7/bits/stl_pair.h:456:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::pair<_T1, _T2>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/ios:40, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from matching.cpp:1: /usr/include/c++/7/bits/stl_iterator.h:311:5: note: candidate: template<class _Iterator> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator!=(const reverse_iterator<_Iterator>& __x, ^~~~~~~~ /usr/include/c++/7/bits/stl_iterator.h:311:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::reverse_iterator<_Iterator>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/ios:40, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from matching.cpp:1: /usr/include/c++/7/bits/stl_iterator.h:349:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator!=(const reverse_iterator<_IteratorL>& __x, ^~~~~~~~ /usr/include/c++/7/bits/stl_iterator.h:349:5: note: template argument deduction/substitution failed: matching.cpp:71:36: note: 'std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree_const_iterator<std::pair<int, int> >}' is not derived from 'const std::reverse_iterator<_Iterator>' while (it != ty_del[v].end() && (*it).F <= r) {add_remove(b[(*it).S], (*it).S); it++;} ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/ios:40, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45,