I am trying with Articulation point + Kruskal.... Imperial roads That's why my code becomes so large and i can't fix bug. Is there any other approach? Or give me corner case for my code
# | User | Rating |
---|---|---|
1 | tourist | 3947 |
2 | jiangly | 3734 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | ecnerwala | 3581 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3479 |
# | User | Contrib. |
---|---|---|
1 | awoo | 162 |
2 | maomao90 | 160 |
3 | nor | 156 |
4 | cry | 155 |
4 | adamant | 155 |
4 | atcoder_official | 155 |
4 | -is-this-fft- | 155 |
8 | maroonrk | 153 |
9 | SecondThread | 147 |
10 | Petr | 146 |
I am trying with Articulation point + Kruskal.... Imperial roads That's why my code becomes so large and i can't fix bug. Is there any other approach? Or give me corner case for my code
Name |
---|
Find any MST, then if road in query is not in MST, you need to find maximum cost edge on path from x to lca(x, y) and from y to lca(x, y).
Thanks.!!!!!!!!! Got AC :) If anyone needs code