foo.cc: In function 'int main()':
foo.cc:30:9: error: invalid types 'int[int]' for array subscript
if (a[n]==0) printf("%d\n",dp[n-1][0][0]);
^
foo.cc:31:17: error: invalid types 'int[int]' for array subscript
else if (a[n]==1) printf("%d\n",dp[n-1][0][1]+dp[n-1][1][0]);
^
foo.cc:32:17: error: invalid types 'int[int]' for array subscript
else if (a[n]==2) printf("%d\n",dp[n-1][1][1]);
^
foo.cc:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务