版本比较
题解:P5499 [LnOI2019] Abbi 并不想研学
正文
增加 1 行删除 1 行
110 行未改动全部展开11111211311411511611711811959 行未改动110 行未改动全部展开(thi2[u]*=sum2[v])%=mod;//赋值}int now=lthi(u);pr[u]=now;if(!fl){//没有轻儿子,当前节点权值不加入重链和return;}(sum1[u]+=now)%=mod;//一定要有轻儿子才可以赋值(sum2[u]*=now)%=mod;59 行未改动110 行未改动全部展开11111211311411511611711811959 行未改动110 行未改动全部展开(thi2[u]*=sum2[v])%=mod;//赋值}int now=lthi(u);pr[u]=now;if(!fl){//没有轻儿子,当前节点权值不加入重链和return;}(sum1[u]+=now)%=mod;//一定要有轻儿子才可以赋值(sum2[u]*=now)%=mod;59 行未改动