foo.c: In function 'main':
foo.c:8:6: error: 'i' undeclared (first use in this function)
8 | for(i=1;i<=n;i++)
| ^
foo.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
foo.c:12:2: error: variable-sized object may not be initialized
12 | int dp[n+1]={0};
| ^~~
foo.c:12:15: warning: excess elements in array initializer
12 | int dp[n+1]={0};
| ^
foo.c:12:15: note: (near initialization for 'dp')
foo.c:6:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d%d",&n,&m);
| ^~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务