regions.cpp: In function 'int main()':
regions.cpp:39:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (lidx < lv[j].size() && lv[j][lidx] < x)lidx++;
~~~~~^~~~~~~~~~~~~~
regions.cpp:40:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (ridx < rv[j].size() && rv[j][ridx] < x)ridx++;
~~~~~^~~~~~~~~~~~~~
regions.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &n, &r, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
regions.cpp:22:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &arr[1]);
~~~~~^~~~~~~~~~~~~~~
regions.cpp:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
~~~~~^~~~~~~~~~~~~~~~
regions.cpp:50:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
~~~~~^~~~~~~~~~~~~~~~