import java.util.*; public class RandomGraph { static int n; static double p; static Random gen; static void shuffle(int[] v,int n){ int j, temp; for (int i=n-1;i>0;i--){ j = gen.nextInt(i+1); temp = v[i]; v[i] = v[j]; v[j] = temp; } } // // Knuth shuffle // public static void main(String[] args) { if (args.length < 2) { System.out.println("PARAMS: n vertices, p edge probability"); return; } n = Integer.parseInt(args[0]); p = Double.parseDouble(args[1]); gen = new Random(); System.out.println("p edge "+ n + " 0"); // generate n vertices with weights in range 1 to 200 for (int i=0;i