DP Problem Deep Thinking