implement problem, use STL map, good