(String[] args)
| 219 | } |
| 220 | |
| 221 | public static void main(String[] args) throws Exception { |
| 222 | FastReader in = new FastReader(System.in); |
| 223 | PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); |
| 224 | n = in.nextInt(); |
| 225 | m = in.nextInt(); |
| 226 | q = in.nextInt(); |
| 227 | cntn = n; |
| 228 | for (int i = 1; i <= n; i++) { |
| 229 | arr[i] = in.nextInt(); |
| 230 | } |
| 231 | for (int i = 1, u, v; i <= m; i++) { |
| 232 | u = in.nextInt(); |
| 233 | v = in.nextInt(); |
| 234 | addEdge1(u, v); |
| 235 | addEdge1(v, u); |
| 236 | } |
| 237 | tarjan(1); |
| 238 | dfs1(1, 0); |
| 239 | dfs2(1, 1); |
| 240 | build(1, cnti, 1); |
| 241 | for (int i = 1; i <= q; i++) { |
| 242 | char op = in.nextChar(); |
| 243 | int x = in.nextInt(); |
| 244 | int y = in.nextInt(); |
| 245 | if (op == 'C') { |
| 246 | int father = fa[x]; |
| 247 | if (father > 0) { |
| 248 | delNum(father, arr[x]); |
| 249 | addNum(father, y); |
| 250 | update(nid[father], getMin(father), 1, cnti, 1); |
| 251 | } |
| 252 | arr[x] = y; |
| 253 | update(nid[x], y, 1, cnti, 1); |
| 254 | } else { |
| 255 | out.println(pathMin(x, y)); |
| 256 | } |
| 257 | } |
| 258 | out.flush(); |
| 259 | out.close(); |
| 260 | } |
| 261 | |
| 262 | // 读写工具类 |
| 263 | static class FastReader { |
nothing calls this directly
no test coverage detected