贪心算法,先每个人发放1K,然后遍历,把不满足的厨师的奖金调整到当前满足的状态,然后再遍历,一直到所有厨师都满足。 import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); while (scan.hasNext()) { int n = scan.nextInt(); int[] nums = new int[n]; ...