(int x, int y)
| 152 | } |
| 153 | |
| 154 | public static void cut(int x, int y) { |
| 155 | makeroot(x); |
| 156 | if (findroot(y) == x && fa[y] == x && ls[y] == 0 && rs[x] == y) { |
| 157 | fa[y] = rs[x] = 0; |
| 158 | up(x); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | public static void main(String[] args) throws Exception { |
| 163 | FastReader in = new FastReader(System.in); |