foo.c: In function 'main':
foo.c:22:11: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
22 | cnt += abs(a[i] - a[j]);
| ^~~
foo.c:15:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
15 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
foo.c:17:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%d", &a[i]);
| ^~~~~~~~~~~~~~~~~~
foo.c:5:6: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
5 | int end = a[0];
| ^~~
[Hydro](https://hydro.ac)提供评测服务