2019杭电多校第二场hdu6601-Keen On Everything But Triangle(主席树)
ProblemDescription传送门Nsticksarearrangedinarow,andtheirlengthsarea1,a2,…,aN.ThereareQquerys.Fori-thofthem,youcanonlyusesticksbetweenli-thtori-th.Pleaseoutputthemaximumcircumferenceofallthetrianglesthat