F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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;}
                                                                                          ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 06:47:38, Gzip enabled