Problem G
A+B Problem
Given
Input
The first line of input consists of a single integer
Output
Output an integer representing the number of ways.
Sample Input 1 | Sample Output 1 |
---|---|
4 1 2 3 4 |
4 |
Sample Input 2 | Sample Output 2 |
---|---|
6 1 1 3 3 4 6 |
10 |