(count> countWork [node-> id] [node-> connections [i] -> id])))
{[node-> id] [node-> connections [i] -> id]=count; (node-> connections [i], count +1); p>
}
} getWorkTime (Node * node, int time) {(int i=0; i countConnections; i + +) ((node-> id!=node-> connections [ i] -> id) &&
((workTime [node-> id] [node-> connections [i] -> id] == - 1) | |
(time> workTime [node-> id] [node-> connections [i] -> id])))
{[node-> id] [node-> connections [i] -> id]=time; (node-> connections [i], time + node-> weightConnections [i]);
}
} work (int ** matrix, int countMatrix) {** nodes;=new Node * [countMatrix]; (int i=0; i
{(matrix [i] [j])
{[i] -> connect (nodes [j], matrix [i] [j]);
}
}=new int * [countMatrix]; (int i=0; i
}
/ / ---------------------------------------------------------------------------
__fastcall TForm1 :: TForm1 (TComponent * Owner)
: TForm (Owner)
{(time (NULL));
}
//---------------------------------------------------------------------------__fastcall TForm1 :: Button3Click (TObject * Sender)
{(N == NULL)
{(«Відкрийте фаїл»); return;
} inb=false; (int f=0; f
{= false;
}
{= true;
} (inb == false)
{(«Намалюйте граф»); return;
} (int f=0; f
{StringGrid1-> RowCount=StringGrid1-> RowCount +1;} hod=1; (int i=0; i
{if (Matrix [i] [j]!=0)
{[hod].Nach=i;e[hod].Kon=j;e[hod].Ves=Matrix[i][j];->Cells[1][hod]=FloatToStr(e[hod].Nach)+«-»+FloatToStr(e[hod].Kon);->Cells[2][hod]=e[hod].Ves;++;}
} y=1, l=1; (Matrix, N); (int i=0; i
{(countWork [i] [j]> - 1)
{-> Cells [0] [l]=countWork [i] [j]; l + +;
} (workTime [i] [j]> - 1)
{-> Cells [3] [y]=workTime [i] [j]; y + +;
}
} (int f=1; f
{->Cells[4][f]=StrToInt(StringGrid1->Cells[2][f])+StrToInt(StringGrid1->Cells[3][f]);
} max=StrToInt (StringGrid1-> Cells [4] [1]); (int f=2; f
{if (StrToInt (StringGrid1-> ...