Starting from 1
Const intn= -;Const intB=1e4,l= -;structbig{intSize,d[l]; Big (intA=1): Size (a) {memset (d,0,sizeof(int)*L);}};voidJia (Big &a,big &b) { intg=0, I; for(i=1;; i++){ if(g==0&&i>a.size&&i>b.size) Break; inttmp=G; if(i<=a.size) tmp+=A.d[i]; if(i<=b.size) tmp+=B.d[i]; A.d[i]=tmp%C; G=tmp/C; } a.size=i-1;}voidCheng (Big &a,big &b,big &c) { for(intI=1; i<=a.size;i++){ intg=0; for(intj=1; j<=b.size;j++) {C.d[i+j-1]+=a.d[i]*b.d[j]+G; G=c.d[i+j-1]/B; C.d[i+j-1]%=B; } c.d[i+b.size]=G; } c.size=a.size+b.size; while(c.d[c.size]==0&&c.size>1) c.size--;}voidChengint (Big &a,intk) { intg=0, I; for(i=1; i<=a.size;i++){ inttmp=a.d[i]*K; A.d[i]= (tmp+g)%C; G= (tmp+g)/C; } while(g) {a.d[++a.size]=g%B; G/=B; }}voidCopy (Big &t,big &s) {T.size=s.size; for(intI=1; i<=s.size;i++) t.d[i]=s.d[i];} Big Max (Big&a,big &b) { if(a.size>b.size)returnA; if(a.size<b.size)returnb; for(inti=a.size;i>=1; i--){ if(A.d[i]>b.d[i])returnA; if(A.d[i]<b.d[i])returnb; } returnA;}voidPrint (Big &a) { for(inti=a.size;i>=1; i--){ if(i==a.size); Else if(a.d[i]<Ten) cout<<"0000"; Else if(a.d[i]< -) cout<<"xx"; Else if(a.d[i]< +) cout<<"0"; cout<<A.d[i]; } cout<<"\ n";}
[TEM] High Accuracy 2