matryoshka.cpp: In function 'int main()':
matryoshka.cpp:35:30: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<int>::size_type {aka long unsigned int}' [-Wformat=]
printf ("%d\n", S.size ());
~~~~~~~~~^
matryoshka.cpp:13:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d", &N, &Q);
~~~~~~^~~~~~~~~~~~~~~~~
matryoshka.cpp:15:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d", &v[i].first, &v[i].second);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
matryoshka.cpp:20:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d", &X, &Y), nr = 0;
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~