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_39612449_5538.cpp: In function 'int main()':
0_0_39612449_5538.cpp:46:64: error: expected '}' at end of input
   46 |                                         if(s[i][k-j+1]=='+') {                                          //2-0 0-1 1-2                                            pos-=c*poww[j-1];                                               ++c;                                            c%=3;                                           pos+=c*poww[j-1];                                      }else if(s[i][k-j+1]=='-'){                                             //0-2 1-0 2-1                                            pos-=c*poww[j-1];                                               --c;                                            if(c==-1) c+=3;                                                 pos+=c*poww[j-1];                                      }                               }                               if(fl[pos]==0){                                 ++cnt;                                  b[cnt]=pos;                                     fl[pos]=1;                              }                               a[p^1][pos]+=a[p][pre]; a[p^1][pos]%=mod;                       }                       for(int o=1;o<=cnt;++o) now[++tot]=b[o];                        p^=1;           }               sort(now+1,now+1+tot);          for(int i=1;i<=tot;++i){                        for(int j=k;j>=1;--j){                          int c=(now[i]%poww[j])/poww[j-1];                               if(c==0) cout<<'A';                             if(c==1) cout<<'B';                             if(c==2) cout<<'C';                     }                       cout<<' ';                      cout<<a[p][now[i]]%mod<<'\n';           }       }       return 0;}
      |                                                              ~^~
0_0_39612449_5538.cpp:46:64: error: expected '}' at end of input
0_0_39612449_5538.cpp:44:57: note: to match this '{'
   44 |                                 for(int j=1; j<=k; ++j) {
      |                                                         ^
0_0_39612449_5538.cpp:46:64: error: expected '}' at end of input
   46 |                                         if(s[i][k-j+1]=='+') {                                          //2-0 0-1 1-2                                            pos-=c*poww[j-1];                                               ++c;                                            c%=3;                                           pos+=c*poww[j-1];                                      }else if(s[i][k-j+1]=='-'){                                             //0-2 1-0 2-1                                            pos-=c*poww[j-1];                                               --c;                                            if(c==-1) c+=3;                                                 pos+=c*poww[j-1];                                      }                               }                               if(fl[pos]==0){                                 ++cnt;                                  b[cnt]=pos;                                     fl[pos]=1;                              }                               a[p^1][pos]+=a[p][pre]; a[p^1][pos]%=mod;                       }                       for(int o=1;o<=cnt;++o) now[++tot]=b[o];                        p^=1;           }               sort(now+1,now+1+tot);          for(int i=1;i<=tot;++i){                        for(int j=k;j>=1;--j){                          int c=(now[i]%poww[j])/poww[j-1];                               if(c==0) cout<<'A';                             if(c==1) cout<<'B';                             if(c==2) cout<<'C';                     }                       cout<<' ';                      cout<<a[p][now[i]]%mod<<'\n';           }       }       return 0;}
      |                                                               ^~
0_0_39612449_5538.cpp:41:51: note: to match this '{'
   41 |                         for(int o=1; o<=tot; ++o) {
      |                                                   ^
0_0_39612449_5538.cpp:46:64: error: expected '}' at end of input
   46 |                                         if(s[i][k-j+1]=='+') {                                          //2-0 0-1 1-2                                            pos-=c*poww[j-1];                                               ++c;                                            c%=3;                                           pos+=c*poww[j-1];                                      }else if(s[i][k-j+1]=='-'){                                             //0-2 1-0 2-1                                            pos-=c*poww[j-1];                                               --c;                                            if(c==-1) c+=3;                                                 pos+=c*poww[j-1];                                      }                               }                               if(fl[pos]==0){                                 ++cnt;                                  b[cnt]=pos;                                     fl[pos]=1;                              }                               a[p^1][pos]+=a[p][pre]; a[p^1][pos]%=mod;                       }                       for(int o=1;o<=cnt;++o) now[++tot]=b[o];                        p^=1;           }               sort(now+1,now+1+tot);          for(int i=1;i<=tot;++i){                        for(int j=k;j>=1;--j){                          int c=(now[i]%poww[j])/poww[j-1];                               if(c==0) cout<<'A';                             if(c==1) cout<<'B';                             if(c==2) cout<<'C';                     }                       cout<<' ';                      cout<<a[p][now[i]]%mod<<'\n';           }       }       return 0;}
      |                                                               ^~
0_0_39612449_5538.cpp:35:41: note: to match this '{'
   35 |                 for(int i=1; i<=n; ++i) {
      |                                         ^
0_0_39612449_5538.cpp:46:64: error: expected '}' at end of input
   46 |                                         if(s[i][k-j+1]=='+') {                                          //2-0 0-1 1-2                                            pos-=c*poww[j-1];                                               ++c;                                            c%=3;                                           pos+=c*poww[j-1];                                      }else if(s[i][k-j+1]=='-'){                                             //0-2 1-0 2-1                                            pos-=c*poww[j-1];                                               --c;                                            if(c==-1) c+=3;                                                 pos+=c*poww[j-1];                                      }                               }                               if(fl[pos]==0){                                 ++cnt;                                  b[cnt]=pos;                                     fl[pos]=1;                              }                               a[p^1][pos]+=a[p][pre]; a[p^1][pos]%=mod;                       }                       for(int o=1;o<=cnt;++o) now[++tot]=b[o];                        p^=1;           }               sort(now+1,now+1+tot);          for(int i=1;i<=tot;++i){                        for(int j=k;j>=1;--j){                          int c=(now[i]%poww[j])/poww[j-1];                               if(c==0) cout<<'A';                             if(c==1) cout<<'B';                             if(c==2) cout<<'C';                     }                       cout<<' ';                      cout<<a[p][now[i]]%mod<<'\n';           }       }       return 0;}
      |                                                               ^~
0_0_39612449_5538.cpp:19:20: note: to match this '{'
   19 |         while(T--) {
      |                    ^
0_0_39612449_5538.cpp:46:64: error: expected '}' at end of input
   46 |                                         if(s[i][k-j+1]=='+') {                                          //2-0 0-1 1-2                                            pos-=c*poww[j-1];                                               ++c;                                            c%=3;                                           pos+=c*poww[j-1];                                      }else if(s[i][k-j+1]=='-'){                                             //0-2 1-0 2-1                                            pos-=c*poww[j-1];                                               --c;                                            if(c==-1) c+=3;                                                 pos+=c*poww[j-1];                                      }                               }                               if(fl[pos]==0){                                 ++cnt;                                  b[cnt]=pos;                                     fl[pos]=1;                              }                               a[p^1][pos]+=a[p][pre]; a[p^1][pos]%=mod;                       }                       for(int o=1;o<=cnt;++o) now[++tot]=b[o];                        p^=1;           }               sort(now+1,now+1+tot);          for(int i=1;i<=tot;++i){                        for(int j=k;j>=1;--j){                          int c=(now[i]%poww[j])/poww[j-1];                               if(c==0) cout<<'A';                             if(c==1) cout<<'B';                             if(c==2) cout<<'C';                     }                       cout<<' ';                      cout<<a[p][now[i]]%mod<<'\n';           }       }       return 0;}
      |                                                               ^~
0_0_39612449_5538.cpp:13:15: note: to match this '{'
   13 | signed main() {
      |               ^


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 20:04:41, Gzip enabled