for the problem A
f4 | 3 | - | 9 | - |
f3 | 2 | 4 | 8 | 10 |
f2 | | 5 | | 11 |
f1 | 0 | 6 | - | 12 |
* every (m-1)*2 time span the elevate arrived floor s and go up
* every (m-1)*2 time span the elevate arrived floor s and go down
base time for each floor is:
up: (s-1)
down: (m-1)+(m-s)