atcoder#ABC262C. [ABC262C] Min Max Pair
[ABC262C] Min Max Pair
Score : points
Problem Statement
You are given a sequence of length consisting of integers between and .
Find the number of pairs of integers that satisfy all of the following conditions:
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
4
1 3 2 4
2
satisfy the conditions.
10
5 8 2 2 1 6 7 2 9 10
8