直接高精度模拟,加上简单贪心 Program XJOI2263; ..] of longint; var a,b:arr; s1,s2:ansistring; i,j:longint; sum:int64; operator *(a:arr;x:longint) c:arr; var i:longint; begin fillchar(c,sizeof(c),); ] do c[i]:=a[i]*x; ] do begin c[i+]:=c[i+]+c[i] ; c[i]:=c[i] ; end…