#include #include using namespace std; struct vertex { int x,y; int l,g;//lewy/prawy gora/dol int ind; bool visited; vertex() { l=g=x=y=ind=0; visited=0; } };vertex w[1002]; bool porx(vertex a, vertex b) { if (a.x!=b.x) return a.xb.y; } bool pory(vertex a, vertex b) { if (a.y!=b.y) return a.yb.x; } bool porind(vertex a, vertex b) { return a.ind