event2.cpp: In function 'int main()':
event2.cpp:45:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for (int j = 0; j < invL[i].size(); j++) r = min(r, R[invL[i][j]]);
| ~~^~~~~~~~~~~~~~~~
event2.cpp:49:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
49 | for (int j = 0; j <= z.size(); j++) {
| ~~^~~~~~~~~~~
event2.cpp:60:37: warning: comparison of integer expressions of different signedness: 'std::set<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
60 | for (int i = 0; used.size() - 2 < K; i++) {
| ~~~~~~~~~~~~~~~~^~~
event2.cpp:29:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | scanf("%d%d", &N, &K);
| ~~~~~^~~~~~~~~~~~~~~~
event2.cpp:31:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | scanf("%d%d", L + i, R + i);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~