import java.util.*; import java.io.*; public class Display { private static void swap(long[]x,int i,int j){long temp = x[i]; x[i] = x[j]; x[j] = temp;} private static void sort(long[]x,int n){ for (int i=n-1;i>0;i--) for (int j=0;j 0 && solved){System.out.println(nds[count]); count++;} //if (solved) count++; fin.close(); } System.out.format("%d %.2f %d ",n,((float)p)/100.0,k); System.out.print(average(nds,count) +" "+ min(nds,count) +" "+ median(nds,count) +" "+ max(nds,count) +" "); System.out.print(average(solveTime,count) +" "+ min(solveTime,count) +" "+ median(solveTime,count) +" "+ max(solveTime,count) +" "); System.out.print(average(disc,count) +" "+ min(disc,count) +" "+ median(disc,count) +" "+ max(disc,count) +" "); System.out.print(((sat * 100)/count) +" "); System.out.format("%.2f ",geometricMean(nds,count)); System.out.println(" "+ count); } public static void main(String[] args) throws IOException { String style = args[0]; int n = Integer.parseInt(args[1]); // vertices in a graph int p = Integer.parseInt(args[2]); // edge probability int kLo = Integer.parseInt(args[3]); // size of independent set int kHi = Integer.parseInt(args[4]); // size of independent set int lwb = Integer.parseInt(args[5]); // index of 1st results file int upb = Integer.parseInt(args[6]); // index of last results file for (int k=kLo;k<=kHi;k++) stats(style,n,p,k,lwb,upb); } }