In an alternate universe, Vlad is stuck inside a futuristic version of the Poenari Fortress, now spanning floors, numbered through . From each floor (), he can only go up, either by taking the stairs and paying drop of blood (this is the currency that vampires use to pay in Romania), or by turning into a bat and traversing the vents, for which he has to pay drops of blood. The stairs can take him up to floors upwards, while the vents span up to floors upwards, where and are two given arrays: and .
Formally, from floor (), Vlad can go:
anywhere from floor to floor without exceeding , for a cost of
anywhere from floor to floor without exceeding , for a cost of
Furthermore, his brothers Radu and Mircea proposed scenarios for Vlad, each one consisting of two floors and (). Vlad has to answer their questions: what is the least amount of blood that he has to sacrifice to get from floor to floor ?