var n,m,s,t,v,i,a,b,c:longint;//这道题的代码不是这个,在下面 first,tr,p,q:..]of longint; next,eb,ew:..]of longint; procedure swap(a,b:longint); var t:longint; begin t:=tr[a];tr[a]:=tr[b];tr[b]:=t; t:=p[a];p[a]:=p[b];p[b]:=t; t:=q[p[a]];q[p[a]]:=q[p[b]];q[p[b]]:=t;…