## Mock CCC '19 Contest 1 S1 - A Complete Problem

View as PDF

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Given a set of elements, print the number of nonempty subsets where the maximum element is less than or equal to .

Two subsets are considered different if an element at index for some exists in the first subset but not in the second subset, or vice versa.

#### Input Specification

The first line will contain two integers , the number of elements.

The second line will contain integers, .

#### Output Specification

The number of nonempty subsets where the max element is less than or equal to .

For 1/15 of the points, .

For 5/15 of the points,

#### Sample Input

4 100
2 3 100 2

#### Sample Output

15