Update Problem D: Dynamic Dictionary Coding.cpp