DP consolidation and Roman to Integer