C++ has always had the convenient data structures std::set
and std::map
, which are tree data structures whose operations take time. With C++11, we finally received a hash set and hash map in std::unordered_set
and std::unordered_map
. Unfortunately, I've seen a lot of people on Codeforces get hacked or fail system tests when using these. In this post I'll explain how it's possible to break these data structures and what you can do in order to continue using your favorite hash maps without worrying about being hacked