You are given an array nums consisting of non-negative integers. You are also given a queries, where queries[i] = [x_i, m_i].
The answer to the x_i with any element in nums that is less than or equal to m_i. Formally, the answer is the maximum value of nums[j] x_i for all indices j such that nums[j] m_i. If every element in nums is strictly greater than m_i, the answer to that query is
Return an array containing the results of all queries in the corresponding order.
Constraints:
nums.length, queries.length
queries[i].length
nums[j], x_i, m_i
You are given an array nums consisting of non-negative integers. You are also given a queries, where queries[i] = [x_i, m_i].
The answer to the x_i with any element in nums that is less than or equal to m_i. Formally, the answer is the maximum value of nums[j] x_i for all indices j such that nums[j] m_i. If every element in nums is strictly greater than m_i, the answer to that query is
Return an array containing the results of all queries in the corresponding order.
Constraints:
nums.length, queries.length
queries[i].length
nums[j], x_i, m_i