示例:
输入:customers = [1,0,1,2,1,1,7,5], grumpy = [0,1,0,1,0,1,0,1], X = 3
输出:16
解释:
书店老板在最后 3 分钟保持冷静。...代码:
class Solution {
public int maxSatisfied(int[] customers, int[] grumpy, int minutes) {...int n = customers.length, ans = 0;
for (int i = 0; i < n; i++) {
if (grumpy[i] ==