• 2024-12-12问题duoduo
    include<bits/stdc++.h>defineintlonglongusingnamespacestd;constintN=55;constintinf=0x3f3f3f3f3f3f3f3f;intn,a,b;intw[N];intf[N][N],ans=inf;//f[i][j]=min{f[k][j-1]+a+b(max(k+1,i)-min(k+1,j))^2}intquery(intl,intr){intret1=0,r