package 字符串; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Map<Integer,List<Integer>> map = new HashMap<>(); int[] value = new int[n+2]; int[] dp = new int[n+2]; int[] dad ...