Create a data structure that beats std::unordered set for a limited universe size.
Note that CSES doesn't support command line parameters, so either hard code a limit of 10^6 into your code, or just use the limit of 2^31 - 1 as long as you use less than 512 MB of space.