https://cses.fi/problemset/task/1139
https://cses.fi/paste/cdb7092742c2c314be200e/
DFS , TC: O(n)
m=2*n
Segment tree , build and query , O(mlogmlogm) , roughly
How can i improve this implementation , current gives TLE , is my TC calculation right ?
https://cses.fi/problemset/task/1139
https://cses.fi/paste/cdb7092742c2c314be200e/
DFS , TC: O(n)
m=2*n
Segment tree , build and query , O(mlogmlogm) , roughly
| Rev. | Lang. | By | When | Δ | Comment | |
|---|---|---|---|---|---|---|
| en2 |
|
rickgrimes07 | 2025-03-26 23:24:30 | 86 | ||
| en1 |
|
rickgrimes07 | 2025-03-26 23:23:50 | 196 | Initial revision (published) |