(int x, int y)
| 162 | } |
| 163 | |
| 164 | public static void cut(int x, int y) { |
| 165 | makeroot(x); |
| 166 | if (findroot(y) == x && fa[y] == x && ls[y] == 0 && rs[x] == y) { |
| 167 | fa[y] = rs[x] = 0; |
| 168 | up(x); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | public static int node(int c, int x) { |
| 173 | return c * n + x; |
no test coverage detected