You are given an integer array prices, which shows the chocolate prices and a 2D integer array queries, where queries[i] = [ki, mi].
Alice and Bob went to buy some chocolates, and Alice suggested a way to pay for them, and Bob agreed.
The terms for each query are as follows:
If the price of a chocolate is less than or equal toki, Bob pays for it.
Otherwise, Bob pays ki of it, and Alice pays the rest.
Bob wants to select exactlymi chocolates such that his relative loss is minimized, more formally, if, in total, Alice has paid ai and Bob has paid bi, Bob wants to minimize bi - ai.
Return an integer arrayanswhereans[i]is Bob’s minimum relative loss possible forqueries[i].