- 5


𠠠 -

8000

3

4000

2

1000

20

 

.

 

.

:

(D1, ...,

DN) - ,

D = [Tov, C, M] - , s0 = 0

Tov - , - , k = 1 N

- , sk

= sk-1 + kk

: k = 1

Sum - , m1

= 1111

TovMax - 頠 c kk > mk-1

.

: mk

= kk

Sum = C1M1 + 22

+ ... + NN,

TovMax: C×M = (11, ... ,NN).

:

N > 0.

, . , ­. k = 1

s1

= s0 + 11 = 1M1,

max1

= 11.

­:

s2

= s1 + 22 = C1M1

+ 22,

max2 = 22, 22 > max1 = (m1, 22),

max1, 22

£ max1 = (m1, 22).

­ :

sk

= sk-1 + CkMk = C1M1 + + CkMk,

maxk

= Max(maxk-1, kk) = (11, ..., kk).

, k-1:

sk-1

=C1M1 +...+ Ck-1Mk-1,

maxk-1

= Max (C1M1, ,Ck-1Mk-1),

sk mk: