A(0)---a------b-----c----d----e-----B(1000)
1. take #4 and #5 to b
2. go back, pick #3 and meet #2 at a
3. change #3 and #4 when meet #4 at c
4. leave #4 at e
5. go back to meet #3 at d
then all persons arrive B at same time (#1 is the driver).
We have 6 barables a,b,c,d,e and the total time t.
We can have below equastions:
(1). 10t=b+(b-a)+(e-a)+(e-d)+(1000-d) // travel of #1
(2). t=a/2+(e-a)/10+(e-d)/10+(1000-d)/10 // travel of #2
(3). t=a/2+(c-a)/10(d-c)/3+(1000-d)/10 // travel of #3
(4). t=b/10 +(c-b)/4+(e-c)/10+(1000-e)/4 // travel of #4
(5). t=b/10 +(1000-b)/5 // travel of #5
(6). (c-b)/v4=(b-a)/10+(c-a)/10