-

         

q,


if (q > 0)

{

j=q ;

do

{

j-- ;

if ((d[j]!=-1) && (u_lu[q]<u_lu[j]))

q = j ;

} while (j>0);

};



// q, d[u]!=0

// u_lu[q]

// elp

if (l[u] > l[q]+u-q) l[u+1] = l[u]; else l[u+1] = l[q]+u-q;





// elp(x)

for (i = 0; i < n - k; i++) elp[u+1][i] = 0;

for (i = 0; i <= l[q]; i++)

if (elp[q][i]!=-1)

elp[u+1][i+u-q]=alpha_to[(d[u]+n-d[q]+elp[q][i])%n];



for (i=0; i<=l[u]; i++)

{

elp[u+1][i] ^= elp[u][i];



// elp

//

elp[u][i] = index_of[elp[u][i]];

}

}

u_lu[u+1] = u-l[u+1];



// (u + 1)'

//---------------------------------------------------------------------

if (u < n-k) //

{ //



if (s[u + 1]!=-1) d[u+1] = alpha_to[s[u+1]]; else d[u + 1] = 0;



for (i = 1; i <= l[u + 1]; i++)

if ((s[u + 1 - i] != -1) && (elp[u + 1][i]!=0))

d[u+1] ^= alpha_to[(s[u+1-i]+index_of[elp[u+1][i]])%n];



// d[u+1]

d[u+1] = index_of[d[u+1]];

}

} while ((u < n-k) && (l[u+1]<=t));


    







Forekc.ru
, , , , , , , , , ,