pictionary.cpp: In function 'int main()':
pictionary.cpp:22:59: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
for(int i = 0; i < q; ++i) if(L[i] < R[i]) ls[L[i]+R[i] >> 1].emplace(i);
~~~~^~~~~
pictionary.cpp:22:80: error: no matching function for call to 'std::vector<int>::emplace(int&)'
for(int i = 0; i < q; ++i) if(L[i] < R[i]) ls[L[i]+R[i] >> 1].emplace(i);
^
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 pictionary.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:997:2: note: candidate: template<class ... _Args> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::emplace(std::vector<_Tp, _Alloc>::const_iterator, _Args&& ...) [with _Args = {_Args ...}; _Tp = int; _Alloc = std::allocator<int>]
emplace(const_iterator __position, _Args&&... __args)
^~~~~~~
/usr/include/c++/7/bits/stl_vector.h:997:2: note: template argument deduction/substitution failed:
pictionary.cpp:22:80: note: cannot convert 'i' (type 'int') to type 'std::vector<int>::const_iterator {aka __gnu_cxx::__normal_iterator<const int*, std::vector<int> >}'
for(int i = 0; i < q; ++i) if(L[i] < R[i]) ls[L[i]+R[i] >> 1].emplace(i);
^
pictionary.cpp:19:10: warning: unused variable 'status' [-Wunused-variable]
bool status = true;
^~~~~~
pictionary.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &m, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
pictionary.cpp:18:66: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 0; i < q; ++i) scanf("%d %d", X+i, Y+i), L[i] = 1, R[i] = m;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~