AdvancedRating 1600
How Many Longest Increasing?
Count the longest strictly increasing subsequences (different sets of positions count separately).
Input
n (≤ 1000), then n integers.
Output
One integer.
Sample 1
Input
5 1 3 5 4 7
Output
2
Sample 2
Input
5 2 2 2 2 2
Output
5
Output appears here