0_0_20614237_2792.cpp:12:5: error: expected unqualified-id before '=' token
=1) { if(k&1)B=mul(B,A); A=mul(A,A); k=k/2; } return B;}void print(matrix A){ cout<<"matrix A"<<endl; for(int i=1;i<=n+2;i++) { for(int j=1;j<=n+2;j++) { cout<<A.mat[i][j]<<" "; } cout<<endl; }}int main(){ int m; while(~scanf("%d%d",&n,&m)) { matrix A,B; A.mat[1][1]=23; for(int i=1;i<=n;i++) { scanf("%d",&A.mat[i+1][1]); } A.mat[n+2][1]=3; for(int i=1;i<=n+1;i++)B.mat[i][1]=10; for(int i=1;i<=n+2;i++)B.mat[i][n+2]=1; for(int i=2;i<=n+1;i++) { for(int j=2;j<=i;j++)B.mat[i][j]=1; } B=powmul(B,m); A=mul(B,A); cout<<A.mat[n+1][1]<<endl; } return 0;}
^
0_0_20614237_2792.cpp:12:81: error: expected unqualified-id before 'return'
=1) { if(k&1)B=mul(B,A); A=mul(A,A); k=k/2; } return B;}void print(matrix A){ cout<<"matrix A"<<endl; for(int i=1;i<=n+2;i++) { for(int j=1;j<=n+2;j++) { cout<<A.mat[i][j]<<" "; } cout<<endl; }}int main(){ int m; while(~scanf("%d%d",&n,&m)) { matrix A,B; A.mat[1][1]=23; for(int i=1;i<=n;i++) { scanf("%d",&A.mat[i+1][1]); } A.mat[n+2][1]=3; for(int i=1;i<=n+1;i++)B.mat[i][1]=10; for(int i=1;i<=n+2;i++)B.mat[i][n+2]=1; for(int i=2;i<=n+1;i++) { for(int j=2;j<=i;j++)B.mat[i][j]=1; } B=powmul(B,m); A=mul(B,A); cout<<A.mat[n+1][1]<<endl; } return 0;}
^
0_0_20614237_2792.cpp:12:90: error: expected declaration before '}' token
=1) { if(k&1)B=mul(B,A); A=mul(A,A); k=k/2; } return B;}void print(matrix A){ cout<<"matrix A"<<endl; for(int i=1;i<=n+2;i++) { for(int j=1;j<=n+2;j++) { cout<<A.mat[i][j]<<" "; } cout<<endl; }}int main(){ int m; while(~scanf("%d%d",&n,&m)) { matrix A,B; A.mat[1][1]=23; for(int i=1;i<=n;i++) { scanf("%d",&A.mat[i+1][1]); } A.mat[n+2][1]=3; for(int i=1;i<=n+1;i++)B.mat[i][1]=10; for(int i=1;i<=n+2;i++)B.mat[i][n+2]=1; for(int i=2;i<=n+1;i++) { for(int j=2;j<=i;j++)B.mat[i][j]=1; } B=powmul(B,m); A=mul(B,A); cout<<A.mat[n+1][1]<<endl; } return 0;}
^
|