i need fast lCA fuction for a tree ( normal problems constraints) to add it to my library untill i learn topics like (sparse table , ..etc)
# | User | Rating |
---|---|---|
1 | tourist | 3947 |
2 | ecnerwala | 3654 |
3 | jiangly | 3627 |
4 | jqdai0815 | 3620 |
5 | orzdevinwang | 3612 |
6 | Benq | 3586 |
7 | Radewoosh | 3582 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3474 |
# | User | Contrib. |
---|---|---|
1 | awoo | 163 |
2 | maomao90 | 160 |
3 | adamant | 156 |
4 | atcoder_official | 155 |
5 | maroonrk | 154 |
6 | -is-this-fft- | 148 |
6 | SecondThread | 148 |
8 | Petr | 147 |
9 | nor | 145 |
10 | cry | 144 |
i need fast lCA fuction for a tree ( normal problems constraints) to add it to my library untill i learn topics like (sparse table , ..etc)
Name |
---|
Auto comment: topic has been updated by _Halabi (previous revision, new revision, compare).
no advanced topics needed, just look up LCA on cpalgorithms.com
thanks
you can check out usaco.guide for it’s binary-lifting LCA tutorial
thanks