(int x, int y)
| 218 | } |
| 219 | |
| 220 | public static void link(int x, int y) { |
| 221 | int prisoner = ++cntt; |
| 222 | addEdge2(prisoner, startTag[x]); |
| 223 | addEdge2(prisoner, endTag[x]); |
| 224 | addEdge2(startTag[y], prisoner); |
| 225 | addEdge2(endTag[y], prisoner); |
| 226 | if (stjump[x][0] != y && stjump[y][0] != x) { |
| 227 | int a = nearest(y, x); |
| 228 | int b = nearest(x, y); |
| 229 | pathSet(a, b, prisoner); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | public static boolean topo() { |
| 234 | int qi = 1, qsiz = 0; |