How the fuck do you even solve this efficiently?
Been looking everywhere and coudnt find a single clear explanation, not a single DP approach let alone a recursive formula, all I find online is some obvious Lagrangians but that's about it.
Been looking everywhere and coudnt find a single clear explanation, not a single DP approach let alone a recursive formula, all I find online is some obvious Lagrangians but that's about it.
