kangaroo.cpp: In function 'int calc(int, int, int, int)':
kangaroo.cpp:10:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
10 | if(dir==0&&cs==0||dir==1&&cs==n-1) return 0;
| ~~~~~~^~~~~~~
kangaroo.cpp:12:14: warning: unused variable 'check' [-Wunused-variable]
12 | int v=0, check=0, ans=0;
| ^~~~~
kangaroo.cpp: In function 'int main()':
kangaroo.cpp:46:11: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
46 | freopen("kangaroo.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
kangaroo.cpp:47:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
47 | freopen("kangaroo.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~