|  | 
|  | 
| back to board | Discussion of Problem 1607. TaxiHint to solve this The key to solve is that : Driver won't take less than offered, and Petr won't pay more than asked. So if you using a loop for example in each step a will be always min(a + b, c) and c will always be max(c - d, a) | 
 | 
|