va.util.Scanner;importsupportclass.SampleGet;lassCh3_R3_15{?publicstaticvoidmain(String[]args)throwsIOException{ //TODOAuto-generatedmethodstub SampleGetcurSamplemap=getSample(); curSamplemap.getBestSample(); BufferedWriteroutput=newBufferedWriter(newFileWriter("output.txt")); //将结果通过output.write()输出 output.write(""+curSamplemap.getResult()); output.close();?}?publicstaticSampleGetgetSample()throwsIOException{ Scannerinput=newScanner(newFileReader("input.txt")); input.useDelimiter("\n"); intsampleamount=Integer.parseInt(input.next().trim()); SampleGetsamplemap=newSampleGet(sampleamount); while(true){ String[]cur=input.next().split(""); if(Integer.parseInt(cur[2].trim())!=0){ samplemap.setSamplePoint(Integer.parseInt(cur[0]),Integer.parseInt(cur[1]),Integer.parseInt(cur[2].trim())); } else{