public class RedPacket { public static void main(String[] args) { int res = splitArray(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9}, 6); System.out.println(res); } public static int splitArray(int[] nums, int m) { int len = nums.length; int[][] dp = new int[len +...