只过了38%,求Java解。相对于C++\C,java更容易造成程序运行超时。 importjava.util.Scanner; publicclassMain { publicstaticvoidmain(String[] args) { Scanner in = newScanner(System.in); intN = in.nextInt(); intM = in.nextInt(); intQ = in.nextInt(); ...