Main.cpp: In function 'int Dist(int, int)':
Main.cpp:11:2: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
11 | while(x<0)x+=T;x%=T;
| ^~~~~
Main.cpp:11:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
11 | while(x<0)x+=T;x%=T;
| ^
Main.cpp:12:2: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
12 | while(y<0)y+=T;y%=T;
| ^~~~~
Main.cpp:12:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
12 | while(y<0)y+=T;y%=T;
| ^
Main.cpp: In function 'int main()':
Main.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | scanf("%i%i",&n,&T);
| ~~~~~^~~~~~~~~~~~~~
Main.cpp:17:46: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
17 | int a[2*n+10];for(int i=1;i<=n;i++) scanf("%i",&a[i]),a[i]%=T;
| ~~~~~^~~~~~~~~~~~