нкції.
1. lin.cpp
// =================== (c) Bashmakov AV Orel, 2001 ===========
// = started 23.10 03.05.01 =
// = finished 21.14 24.05.01 =
// ======================================== =============
# include
// ---------------------------------------- -----------------------------------
# define N 6
{
unsigned temp = 0;
for (int i = 0; i
{
for (int j = temp; j
{
if (i == j) T [i] [j] = rand ()% 0xffffU;
else T [i] [j] = T [j] [i] = rand ()% 0xffffU;
}
temp + +;
}
}
{
for (int i = 0; i
}
{
unsigned long temp1 = 0U;
unsigned long temp2 = 0U;
unsigned S [N] = {0U,};
for (int i = 0; i
{
temp2 = 0;
for (int j = 0; j
{
temp1 = ((unsigned long) T [i] [j] * R1 [j]);
temp2 = ((temp1% 0xffffU) + temp2)% 0xffffU;
}
S [i] = (unsigned) temp2;
}
temp2 = 0;
for (i = 0; i
{
temp1 = (unsigned long) S [i] * R2 [i];
temp2 = ((temp1% 0xffffU) + temp2)% 0xffffU;
}
return temp2;
}
// ---------------------------------------- --------------------------------- long Pow_N (unsigned long a, unsigned long k, unsigned long n) p>
{
unsigned long A, B, K, q, r;
K = k;
B = 1;
A = a;: q = K/2;
r = K-2 * q;
K = q;
if (r == 0) goto s5;
B = (A * B)% n;
if (K == 0) re...