一直时间复杂度太高,求解该如何优化 import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); BigInteger[] di = new BigInteger[n]; BigInteger[] pi = new BigInteger[n]; ...