sprinkler.cpp: In function 'void root(int, int)':
sprinkler.cpp:11:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | for (int i = 0; i < adj[x].size(); i++) {
| ~~^~~~~~~~~~~~~~~
sprinkler.cpp: In function 'int main()':
sprinkler.cpp:23:14: warning: unused variable 'i3' [-Wunused-variable]
23 | int i1, i2, i3;
| ^~
sprinkler.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | scanf("%d %d", &n, &mod);
| ~~~~~^~~~~~~~~~~~~~~~~~~
sprinkler.cpp:25:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
25 | scanf("%d %d", &i1, &i2);
| ~~~~~^~~~~~~~~~~~~~~~~~~
sprinkler.cpp:30:36: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | for (int i = 1; i <= n; i++) scanf("%lld", &a[i][0]);
| ~~~~~^~~~~~~~~~~~~~~~~~
sprinkler.cpp:31:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
sprinkler.cpp:34:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
34 | scanf("%d", &i1);
| ~~~~~^~~~~~~~~~~
sprinkler.cpp:36:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | scanf("%d %d %d", &v, &d, &w);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
sprinkler.cpp:44:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | scanf("%d", &v);
| ~~~~~^~~~~~~~~~