| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 141 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 135 |
| 8 | BledDest | 132 |
| 9 | maroonrk | 131 |
| 10 | qwexd | 129 |
|
+2
Yes. The observation is that all the parents of the nodes in a query has to be in the same path. So find the parent of each node in a query and check if they are in the same path from root using LCA. |
|
+9
If you use |
|
+5
Oh! Didn't notice. Thanks |
|
0
For the 1st test case,
Can't we use the lamp with power 1 to light the whole street? If we put it at position 0 , it will cover [0,1] . then at 2 covering [2,3] , then at 4 covering [4,5] and at 5 covering [5,6] That way the total cost will be 4, which is cheaper. |
|
On
FalseMirror →
Codeforces Round #483 [Thanks, Botan Investments and Victor Shaburov!] Editoral, 8 years ago
0
The left index and the right index of your segment |
| Name |
|---|


