foo.cc:5:17: error: declaration of 'f' as multidimensional array must have bounds for all dimensions except the first
5 | int N,M,a[MAXN],f[3333][],g[1099][1000];
| ^
foo.cc: In function 'int main()':
foo.cc:33:38: error: 'f' was not declared in this scope
33 | for(int j=0;j<M;++j) f[i][j]=1e8;
| ^
foo.cc:35:17: error: 'f' was not declared in this scope
35 | f[i][cnt]=0;
| ^
foo.cc:47:51: error: 'f' was not declared in this scope
47 | if(g[cnt][j]!=-1) f[i][j]=min(f[i][j],f[k-1][g[cnt][j]]+1);
| ^
foo.cc:54:20: error: 'f' was not declared in this scope
54 | if(f[N][i]<1e8)
| ^
foo.cc:59:24: error: 'f' was not declared in this scope
59 | cout<<v1<<" "<<f[N][v1]<<" ";
| ^
[Hydro](https://hydro.ac)提供评测服务