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_39557214_16430.cpp:1:9: fatal error: gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stdc++.h>usin: Invalid argument
    1 | #include<bits/stdc++.h>using namespace std;#define int long longconst int N=100005;int T,n,k,mod;char s[505][15]; int a[2][60005];bool fl[60006];int now[60005],tot;int poww[12];int b[60006],cnt;int p;signed main(){  poww[0]=1;      for(int i=1;i<=10;++i){         poww[i]=poww[i-1]*3;    }       cin>>T; while(T--){             tot=0;          cin>>n>>k>>mod;         for(int i=0;i<60000;++i){                       a[0][i]=0,a[1][i]=0;                    b[i]=0;                 fl[i]=0;                }               p=0;            for(int i=1;i<=n;++i){                  scanf("%s",s[i]+1);             }               a[p][0]=1;              fl[0]=1;                ++tot;          now[tot]=0;             for(int i=1;i<=n;++i){                  cnt=0;                                          for(int o=1;o<=tot;++o){                                int pos=now[o];                         a[p^1][pos]=a[p][pos];                  }                                               for(int o=1;o<=tot;++o){                                int pos=now[o];                         int pre=pos;                            for(int j=1;j<=k;++j){                                  int c=(pos%poww[j])/poww[j-1];                                  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;}/**/
      |         ^~~~~~~~~~~~~~~~~~~~
compilation terminated.


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:11:09, Gzip enabled