@@ -0,0 +1,797 @@
+//https://www.hackerrank.com/challenges/cut-the-sticks%0Aimport java.io.*;%0Aimport java.util.*;%0A%0Apublic class Solution %7B%0A    %0A    public static void main(String%5B%5D args) throws IOException %7B%0A        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A        %0A        //INPUT%0A        short N = Short.parseShort(br.readLine());%0A        short%5B%5D A = new short%5BN%5D;%0A        N = 0;%0A        for(String str : br.readLine().split(%22 %22))%7B%0A            A%5BN++%5D = Short.parseShort(str);%0A        %7D%0A        %0A        //SOLVE%0A        Arrays.sort(A);%0A        %0A        StringBuffer sb = new StringBuffer();%0A        for(int i = 0; i %3C N;)%7B%0A            sb.append((N - i) + %22%5Cn%22);%0A            while (++i %3C N && A%5Bi-1%5D == A%5Bi%5D)%7B%7D%0A        %7D%0A        %0A        //OUTPUT%0A        System.out.print(sb);%0A    %7D%0A%7D%0A

Create cut-the-sticks.java