jail.cpp: In function 'bool dfs1(int)':
jail.cpp:37:38: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
37 | if (u[g[v][i]] == 1 || !u[g[v][i]] && !dfs1(g[v][i])) return 0;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
jail.cpp: In function 'int main()':
jail.cpp:43:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
43 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
jail.cpp:45:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
45 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
jail.cpp:49:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
49 | scanf("%d%d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~
jail.cpp:57:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
57 | scanf("%d", &m);
| ~~~~~^~~~~~~~~~
jail.cpp:59:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
59 | scanf("%d%d", s + i, t + i);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~