foo.c: In function 'main':
foo.c:5:11: error: 'new' undeclared (first use in this function)
5 | int* a = new int[n];
| ^~~
foo.c:5:11: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:15: error: expected ',' or ';' before 'int'
5 | int* a = new int[n];
| ^~~
foo.c:4:12: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
4 | int n, m; scanf("%d%d", &n, &m);
| ^~~~~~~~~~~~~~~~~~~~~
foo.c:7:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%d", &a[i]);
| ^~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务