HackerRank "Shashank and List"

Key point of this problem is "New subsets are the all old subsets having a[i]." - A very useful trick.

After that, it'll simply be a DP one.

原文地址:https://www.cnblogs.com/tonix/p/8295448.html