Dict issue?

Thanks DNF. It just contains one function, but the function is problem-dependent. In other words, it is an input.