AmazonOA #65
Get Unfulfilled Customers (Auction Allocation)
估计中等评测数据准备中,可先阅读题面
考点(AI 标注)模拟/实现贪心调度
requests = [[customerId, quantity, bidAmount, timestamp], ...], total inventory T. Allocate by descending bid; on tie, round-robin by ascending timestamp. Return IDs of customers who get nothing, sorted ascending.
Constraints
1 ≤ n ≤ 10⁴1 ≤ customerId, quantity, bidAmount, timestamp, totalInventory ≤ 10⁸
Example
requests = [[1, 5, 5, 0], [2, 7, 8, 1], [3, 7, 5, 1], [4, 10, 3, 3]]
totalInventory = 18
answer = [4]