Considering the cost and position of the employee, the location of the request is relevant, you can set the status F (i,x,y,z) to represent the completion of the first I request, the minimum cost of three employees now located in X,y,z, which can be easily pushed by I to i+1
(DP can be pushed from i-1 to I, or I can be pushed to i+1, flexible application can write a good equation)
The state transition equation is:
F (i+1,x,y,z) =min (f (i+1,qi+1,y,z), F (i,x,y,z) +c (x,qi+1)) f (i + 1, x, y, z) = m i n (f (i + 1, q i + 1, y, z), F (i, x, Y, z) + C (x, Q i + 1)) f (i+1,x,y,z) = min (f (i+1,q_{i+1},y,z), F (i,x,y,z) + C (x,q_{i+1}))
F (i+1,x,y,z) =min (f (i+1,x,qi+1,z), F (i,x,y,z) +c (y,qi+1)) f (i + 1, x, y, z) = m i n (f (i + 1, x, Q i + 1, z), F (i, x, Y, z) + C (Y, Q i + 1)) f (i+1,x,y,z) = min (f (i+1,x,q_{i+1},z), F (i,x,y,z) + C (y,q_{i+1}))