Tag - dynamic programming c