import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Cupcakes { public static int lenaSort(int a[], int count){ if(a.length<=1){ return a.length; } int pivot = a[0]; //System.out.println("pivot:"+pivot); int lessc=0; int morec=0; for(int i=1;ipivot){ morec++; } else if(a[i]0){ count = count + lessc -1; } if(morec>0){ count = count + morec -1; } int k=0; int j=0; for(int i=1;ipivot){ more[k]=a[i]; k++; } else if(a[i]