character - bradendubois/competitive-programming GitHub Wiki

Character Development

ID: character

Difficulty: 2.2

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, the answer is in the second paragraph; it's the total number of subsets of N that contain at least 2 characters. In a set of size N, there are 2 ^ N subsets, so we can take that, minus N subsets that are a single character, and 1 more subset for the empty set.