Is std::map efficient for this problem?

Printable View