Add dynamicprogramming5.cpp