class Solution {
public:
int maximumProduct(vector
<int>& nums
) {
int n
= nums
.size();
sort(nums
.begin(), nums
.end());
return max(nums
[0] * nums
[1], nums
[n
- 2] * nums
[n
- 3]) * nums
.back();
}
};
转载请注明原文地址: https://lol.8miu.com/read-21958.html