860. 柠檬水找零
public static boolean lemonadeChange(int[] bills) {if (bills.length == 0) {return true;}if (bills[0] > 5) {return false;}int fiveNum = 0;int tenNum = 0;for (int i = 0; i < bills.length; i++) {if (bills[i] == 5) {fiveNum++;continue;}if (bills[i] == 20) {if (fiveNum == 0) {return false;}if (tenNum == 0) {if (fiveNum < 3) {return false;} else {fiveNum = fiveNum - 3;}} else {tenNum--;fiveNum--;}}if (bills[i] == 10) {tenNum++;if (fiveNum == 0) {return false;}fiveNum--;continue;}}return true;}