请告诉我为啥报错
[Error] invalid types 'int[int]' for array subscript
#include<bits/stdc++.h>
using namespace std;
int main(){
int k,f[31][31][31][31][31]={},a[5]={};
cin>>k;
for(int i=0;i<k;i++) cin>>a[i];
f[1][1][1][1][1]=1;
for(int i=1;i<=a[0];i++)
for(int j=1;j<=a[1];j++)
for(int l=1;l<=a[2];l++)
for(int h=1;h<=a[3];h++)
for(int f=1;f<=a[4];f++)
f[i][j][l][h][f]=f[i-1][j][l][h][f]+f[i][j-1][l][h][f]+f[i][j][l-1][h][f]+f[i][j][l][h-1][f]+f[i][j][l][h][f-1];
cout<<f[a[0]][a[1]][a[2]][a[3]][a[4]];
return 0;
}