foo.c: In function 'main':
foo.c:29:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
29 | scanf("%d", &n);
| ^~~~~
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int maxRP2(int n, int x[], int y[]) {
foo.c:29:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
29 | scanf("%d", &n);
| ^~~~~
foo.c:29:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:42:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
42 | printf("%d\n", result);
| ^~~~~~
foo.c:42:5: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:42:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:42:5: note: include '<stdio.h>' or provide a declaration of 'printf'
[Hydro](https://hydro.ac)提供评测服务