sprinkler.cpp: In function 'int main()':
sprinkler.cpp:52:25: warning: statement has no effect [-Wunused-value]
52 | for(d; d <= 40; d ++) r = r * dist[y][d] % l;
| ^
sprinkler.cpp:23:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | scanf("%d %lld", &n, &l);
| ~~~~~^~~~~~~~~~~~~~~~~~~
sprinkler.cpp:25:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
25 | scanf("%d %d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~
sprinkler.cpp:31:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | scanf("%lld", arr + i);
| ~~~~~^~~~~~~~~~~~~~~~~
sprinkler.cpp:36:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
sprinkler.cpp:38:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
38 | scanf("%lld %lld", &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
sprinkler.cpp:40:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
40 | scanf("%lld %lld", &z, &w);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~