struct node { int to; int w; bool operator >( const node &x )const { return x.w < w; } }a[1001];
struct node{ int to; int w; }a[10001]; bool operator >(node a,node b){ a.w > b.w; }