Fill T [ ] [ ] with appropriate value
for i in range ( 1 , K + 1 ) : NEW_LINE INDENT T [ i ] [ K ] = C [ K - i ] NEW_LINE DEDENT for i in range ( 1 , K + 1 ) : NEW_LINE INDENT T [ i + 1 ] [ i ] = 1 NEW_LINE DEDENT