Increasing subsequence
Hard
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given a sequence of integers. Find the number of its increasing subsequences.
Input
The first line contains an integer , representing the length of the sequence. The second line contains positive integers, each less than , which are the elements of the sequence.
Output
Print the number of increasing subsequences in the given sequence.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 667
Acceptance rate 8%