pllk / cphb

Competitive Programmer's Handbook
2.9k stars 347 forks source link

Correct threshold in the scaling method #88

Open matklad opened 2 years ago

matklad commented 2 years ago

It doesn’t make sense to make threshold bigger than the maximal weight, as it’s going to include all the edges anyways.

The complexity, m^2 \log c, also seems wrong to me (picking c=1 doesn’t seem like the best idea), but it isn’t immediately obvious what’s the right estimate here.