Solution 1: https://www.hackerrank.com/challenges/number-list/editorial
Reversed thought: total no. of subsets - no. of subsets without arr[i] > k
Solution 2: constructive solution:
http://www.martinkysel.com/hackerrank-number-list-solution/
时间: 2024-10-13 00:28:59