linear_garden.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
1 | main() {
| ^~~~
linear_garden.c: In function 'main':
linear_garden.c:3:2: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d%d ", &N, &M);
| ^~~~~
linear_garden.c:3:2: warning: incompatible implicit declaration of built-in function 'scanf'
linear_garden.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main() {
linear_garden.c:5:2: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
5 | gets(S);
| ^~~~
linear_garden.c:7:10: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
7 | X<<=N-i-1&1;
| ~~~^~
linear_garden.c:10:31: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
10 | if(t==l && r-l<2) X+=2+(N-i-1&1), Y--;
| ~~~^~
linear_garden.c:15:2: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
15 | printf("%d", (X+Y%M+M)%M);
| ^~~~~~
linear_garden.c:15:2: warning: incompatible implicit declaration of built-in function 'printf'
linear_garden.c:15:2: note: include '<stdio.h>' or provide a declaration of 'printf'
/usr/bin/ld: /tmp/ccY6jFNe.o: in function `main':
linear_garden.c:(.text.startup+0x83): warning: the `gets' function is dangerous and should not be used.