0_0_17202019_22296.cpp:48:17: error: conflicting declaration 'long long int dp [21][2]'
__int64 dp[21][2],sum;
^
0_0_17202019_22296.cpp:5:9: note: previous declaration as 'long long int dp [21]'
__int64 dp[21];
^
0_0_17202019_22296.cpp:49:17: error: 'long long int c [21][21]' redeclared as different kind of symbol
__int64 c[21][21];
^
0_0_17202019_22296.cpp:14:9: note: previous declaration 'long long int c(int, int)'
__int64 c(int n,int m) //算组合数
^
0_0_17202019_22296.cpp: In function 'int main()':
0_0_17202019_22296.cpp:51:5: error: redefinition of 'int main()'
int main()
^
0_0_17202019_22296.cpp:19:5: note: 'int main()' previously defined here
int main()
^
0_0_17202019_22296.cpp:56:16: error: assignment of read-only location '*(c + ((sizetype)i))'
c[i][0]=1; //c[i][j]表示i个中选j个的方案数
^
0_0_17202019_22296.cpp:56:16: error: cannot convert 'int' to 'long long int(int, int)' in assignment
0_0_17202019_22296.cpp:57:16: error: assignment of read-only location '*(c + (((sizetype)i) + ((sizetype)i)))'
c[i][i]=1;
^
0_0_17202019_22296.cpp:57:16: error: cannot convert 'int' to 'long long int(int, int)' in assignment
0_0_17202019_22296.cpp:59:41: error: invalid operands of types 'long long int(int, int)' and 'long long int(int, int)' to binary 'operator+'
c[i][j]=c[i-1][j-1]+c[i-1][j]; //公式,结合杨辉三角理解
^
0_0_17202019_22296.cpp:61:12: error: invalid types 'long long int[int]' for array subscript
dp[1][1]=dp[1][0]=dp[0][0]=dp[0][1]=1;
^
0_0_17202019_22296.cpp:61:21: error: invalid types 'long long int[int]' for array subscript
dp[1][1]=dp[1][0]=dp[0][0]=dp[0][1]=1;
^
0_0_17202019_22296.cpp:61:30: error: invalid types 'long long int[int]' for array subscript
dp[1][1]=dp[1][0]=dp[0][0]=dp[0][1]=1;
^
0_0_17202019_22296.cpp:61:39: error: invalid types 'long long int[int]' for array subscript
dp[1][1]=dp[1][0]=dp[0][0]=dp[0][1]=1;
^
0_0_17202019_22296.cpp:66:25: error: invalid types 'long long int[int]' for array subscript
sum+=dp[j][0]*dp[i-1-j][1]*c[i-1][j];
^
0_0_17202019_22296.cpp:66:38: error: invalid types 'long long int[int]' for array subscript
sum+=dp[j][0]*dp[i-1-j][1]*c[i-1][j];
^
0_0_17202019_22296.cpp:67:16: error: invalid types 'long long int[int]' for array subscript
dp[i][0]=sum/2; //后面递推要用
^
0_0_17202019_22296.cpp:68:16: error: invalid types 'long long int[int]' for array subscript
dp[i][1]=sum/2;
^
0_0_17202019_22296.cpp:74:44: error: invalid types 'long long int[int]' for array subscript
printf("%d %I64d\n",cas,x>1?dp[x][1]*2:1);
^
|