yeah, It seems there are lots of small tests.Surprisingly, when I use bitmask
the runtime is much better than using bool array.
Maybe the bottleneck is about "memset()"..
got AC in 0.308s using dp method, memset only used part of bool array after each case, array initialized before all.