Ad hoc, precalculate k-th occurrence by std::map & std::vector