For this Question: You have bought N cakes and the ith cake has A[i] level of sweetness. Now you want to display the cakes in exhibition but there is a condition that you cannot display two cakes with same sweetness level. Find the maximum number of cakes that you can display.The first line of input contains a single integer N.
Second line contains N space seperated integers A[1], A[2] ..... A[N]

Constraints :
1 <= N <= 100000
1 <= A[i] <= 100000Output a single integer denoting the maximum number of cakes you can display.Sample input 1
5
1 2 3 4 5
 
Sample output 1
5

Sample input 2
4
1 2 2 3

Sample output 2
3

Explanation:-
Test Case 2:- There are 2 cakes with sweetness level 2 as per rule only one of them can be displayed so the ans is 3, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int a[]=new int[100001];
		String str[]=br.readLine().split(" ");
		for(int i=0;i<str.length;i++){
			a[Integer.parseInt(str[i])]++;
		}
		long cnt=0;
		for(int i=0;i<100001;i++){
			if(a[i]>0)
				cnt++;
		}
		System.out.println(cnt);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?