subset sum problem by brute force