3000



200



1200



120



2000



60



600



30





50


­.

.
: S = Sd - Sr
D = (1, ..., N) - , Sd = N
R = (1, ..., ) - , k = k-1 + dk
= (, d), [k = (1...N)]
= (, r). 0
= 0
.:
S - . Sr = bM
: bi = bi-1 + ri
S = Sum (d1, , dN) - Sum (r1, .... rM). [i =
(1 ... M)]
: N, M > 0. b0
= 0
data, ­ - .


'doch: '
: data , 300000
<k>
<dk> * data , 120000
... ... data , 200000
= <Sd> data , 0
:
<k> <rk> * rash: '