Two sensors A and B each emit a non-decreasing stream of timestamps. To audit ordering, count how many pairs (i, j) — one index into stream A and one into stream B — have A[i] > B[j].
Input format
Line 1: two integers n and m, the lengths of streams A and B.
Line 2: n non-decreasing integers, stream A.
Line 3: m non-decreasing integers, stream B.
Output format
A single integer: the number of pairs with A[i] > B[j].
Constraints
- 1 ≤ n, m ≤ 100000
- -1000000000 ≤ each value ≤ 1000000000
- Both streams are given in non-decreasing order.