If you know some special features of special data limit,you can find some way that others don't know but is able to pass the test and can't be hacked.
1.Addition limits feature
For $$$a_i \in N,\sum a_i \le W$$$,it's sure that there are at most $$$\sqrt W$$$ distinct number in array $$$a_i$$$.
For some strings problem,there are limits of the total length of strings $$$M$$$,as those strings have at most $$$\sqrt M$$$ distinct length.
example:




