(int c, int x, int y)
| 227 | } |
| 228 | |
| 229 | public static int query(int c, int x, int y) { |
| 230 | int u = node(c, x); |
| 231 | int v = node(c, y); |
| 232 | if (findroot(u) != findroot(v)) { |
| 233 | return -1; |
| 234 | } |
| 235 | split(u, v); |
| 236 | return maxv[v]; |
| 237 | } |
| 238 | |
| 239 | public static void main(String[] args) throws Exception { |
| 240 | FastReader in = new FastReader(System.in); |