prices array in ascending order.prices array.[ki, mi], perform the following steps:
a. Find the number of chocolates with a price less than or equal to ki using binary search.
b. Initialize two pointers to find the optimal split between cheaper and more expensive chocolates.
c. Use binary search to find the maximum number of expensive chocolates Bob can pay for such that his relative loss is minimized.
d. Calculate Bob's total payment and Alice's total payment based on the split.
e. Compute Bob's relative loss as the difference between his payment and Alice's payment.