typedef struct EdgeRec { struct EdgeRec *next; // 次の要素を指すポインタ int nTo; // 終点番号 int nWeight; // 枝重み } EDGE;