new_home.cpp: In function 'int main()':
new_home.cpp:27:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(yearnum.count(y) < k) printf("-1\n");
~~~~~~~~~~~~~~~~~^~~
new_home.cpp:33:77: error: no match for 'operator-' (operand types are 'std::pair<std::pair<int, int>, int>' and 'std::_Rb_tree_iterator<std::pair<const std::pair<int, int>, int> >')
auto iter = lower_bound(a, b, make_pair(make_pair(y, j), l) - a;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/vector:60,
from new_home.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:389:5: note: candidate: template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) 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:389:5: note: template argument deduction/substitution failed:
new_home.cpp:33:79: note: 'std::pair<std::pair<int, int>, int>' is not derived from 'const std::reverse_iterator<_Iterator>'
auto iter = lower_bound(a, b, make_pair(make_pair(y, j), l) - a;
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/vector:60,
from new_home.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:1191:5: note: candidate: template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator-(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1191:5: note: template argument deduction/substitution failed:
new_home.cpp:33:79: note: 'std::pair<std::pair<int, int>, int>' is not derived from 'const std::move_iterator<_IteratorL>'
auto iter = lower_bound(a, b, make_pair(make_pair(y, j), l) - a;
^
In file included from /usr/include/c++/7/vector:65:0,
from new_home.cpp:2:
/usr/include/c++/7/bits/stl_bvector.h:208:3: note: candidate: std::ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)
operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:208:3: note: no known conversion for argument 1 from 'std::pair<std::pair<int, int>, int>' to 'const std::_Bit_iterator_base&'
new_home.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &k, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:15:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d %d", &x, &t, &a, &b);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:26:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &l, &y);
~~~~~^~~~~~~~~~~~~~~~~