1、线段总长度(a) public class Main3 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); String[] a=new String[n]; int l,r; Map<Integer,Integer> map=new HashMap<>(); for(int i=0;i<n;i++){ ...