import java.lang.*; import java.io.*; public class Main { static int GlobalCount = 0; static int rank = 0; static int size = 5000; // This Method will load the array full of data from standard input // and determine the number of quantiles public static void readInput(int[] temparray) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); for (int i=0; i x ); do { i = i + 1; GlobalCount++; } while ( A[i] < x ); if( i < j ) { exchange(A,i,j); } else return j; } } private static void exchange(int a[], int x, int y) { int t=a[x]; a[x]=a[y]; a[y]=t; } private static int RandomizedPartition( int Array[], int left, int right) { int tmp; int i=((int)((right-left)*Math.random()) + left); exchange(Array, left, i); return Partition(Array,left,right); } static int[] RandomizedQuicksort(int data[], int left, int right) { int mid; if( left < right ) { GlobalCount++; mid = RandomizedPartition(data, left, right); RandomizedQuicksort(data, left, mid); RandomizedQuicksort(data, mid+1, right); } return data; } // This method will print the quantiles public static void printQuantiles(int[] temparray) { int counter = 0; int quantile = size/rank; for (int i = 1; i