| # | User | Rating |
|---|---|---|
| 1 | Kevin114514 | 3722 |
| 2 | Benq | 3676 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3196 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | maroonrk | 153 |
| 2 | Qingyu | 152 |
| 3 | nik_exists | 151 |
| 4 | AmShZ | 147 |
| 4 | maspy | 147 |
| 6 | Um_nik | 143 |
| 7 | Errichto | 139 |
| 8 | adamant | 136 |
| 9 | BledDest | 134 |
| 10 | AksLolCoding | 132 |
|
+1
I have a simpler solution for G1. At the beginning, first query $$$\texttt{1 1 1}$$$. If the obtained answer $$$\bmod 2 = 0$$$, then $$$1$$$ is not a root, otherwise it is. If $$$1$$$ is not a root, we first set $$$v_1 + v_{root} = 0$$$. We can complete this by at most one operation $$$\texttt{2 1}$$$. Then for each $$$2\leq i\leq n$$$, we query $$$\texttt{1 1 i}$$$. Obviously, the obtained answer is $$$r_i$$$. Then we can finish it in $$$O(n)$$$ times. If $$$1$$$ is a root, for each $$$2\leq i\leq n$$$, we query $$$\texttt{1 1 i}$$$. Obviously, the obtained answer is $$$r_i + r_1$$$. Since we know $$$r_1$$$, it is very easy to obtain $$$r_i$$$. submission:https://codeforces.me/contest/2106/submission/317057915. |
| Name |
|---|


