////////////////////////////////////////
int Number (int & Kol2, char * st)
{int N;
ifstream file;
int kol1 = 0; kol2 = 0;
file.open (st);
if (! file) cerr <<"Can not open file!!!";
else
{file>> N;
file.get ();
for ( int i = 0; i <2 * N; i + +)
{char * String = new char [3 * N];
file.getline (string, 3 * N, ' n');
for ( int j = 0; string [j]! = '0 '; j + +)
{If (string [j] == '')
// {if ((j% 2! = 0) | | (j> N * 3))
// {cout <<"Error in file" <
if (I
else kol2 + +;
} p> delete [] String;
}
}
file.close ();
// cout <
return kol1;
}
////////////////////////////////////////////////////////////////////////////////
Array * ReadFileX (Array * X, char * st)
{
ifstream file;
int n;
file.open (st);
if (! file) cerr <<"Can not open file!!!";
else
{file>> N;
file.get ();
int k = 0, n1 = 0;
for (int i = 0; i
file>> N1;
while (N1! = 0) {
X [k]. I = I;
X [k]. J = N1-1;
k + +;
n1 = 0;
file>> N1;
// cout < } p>}
}
file.close ();
return X;
}
////////////////////////////////////////////////////////////////////////////////
Spisok ** ReadFileY (Spisok ** Y, char * st)
{
int n;;
ifstream file;
file.open (st);
if (! file) cerr <<"Can not open file!!!";
else
{file>> N;
file.get ();
for (int i = 0; i
{
char * String = new char [580];
if (String == NULL) {cout <<"Lack of memory"; exit (1);}
file.getline (string, 580, ' n');
delete [] String;
}
for (int j = 0; j
{
int n1;
file>> n1;
Spisok * beg = NULL, * end = NULL;
while (n1! = 0)
{If ((beg == NULL) && (end == NULL))
{ end = new (Spisok);
if (end == NULL) {cout <<"Lack of memory"; exit (1);}
beg = end;}
else
{ end = end-> next = new (Spisok);
if (end == NULL) {cout <<"L ack of memory!"; exit (1);}}
end-> next = NULL;
end-> index = n1-1;
file>> n1;
} p>// File>> n1;
Y [j] = Beg;}
}
file.close ();
return Y;
}
////////////////////////////////////////////////////////////////////////////////
void print3 (Array * X, int N1, int N)
{
int k = 0;
for (int i = 0; i
cout <<' N' <
for (k = 0; k...