CF1311F Moving Points
Description
There are $ n $ points on a coordinate axis $ OX $ . The $ i $ -th point is located at the integer point $ x_i $ and has a speed $ v_i $ . It is guaranteed that no two points occupy the same coordinate. All $ n $ points move with the constant speed, the coordinate of the $ i $ -th point at the moment $ t $ ( $ t $ can be non-integer) is calculated as $ x_i + t \cdot v_i $ .
Consider two points $ i $ and $ j $ . Let $ d(i, j) $ be the minimum possible distance between these two points over any possible moments of time (even non-integer). It means that if two points $ i $ and $ j $ coincide at some moment, the value $ d(i, j) $ will be $ 0 $ .
Your task is to calculate the value $ \sum\limits_{1 \le i < j \le n} $ $ d(i, j) $ (the sum of minimum distances over all pairs of points).
Input Format
N/A
Output Format
N/A