lydrainbowcat / tedukuri

《算法竞赛进阶指南》资源社区
2.35k stars 601 forks source link

Third edition error. #27

Closed DennisZY closed 5 years ago

DennisZY commented 5 years ago

0x66 P399

add_c(c[x],c[y]); should be add_c(c[x],c[y]),add_c(c[y],c[x]);.

lydrainbowcat commented 5 years ago

There's no need to add_c(c[y],c[x]), since it loops from 2 to tot (i.e. 2m bidirectional edges).