A restaurant has one chef. You are given customers, where customers[i] = [arrival_i, time_i]: customer i arrives at time arrival_i and their order takes time_i to prepare. Arrival times are sorted in non-decreasing order.
The chef cooks one order at a time, in the order customers arrive, and starts an order as soon as both the chef is free and the customer has arrived. A customer waits from their arrival until their order is finished. Return the average waiting time of all customers. Answers within 10−5 of the true value are accepted.