Ishaan And Sticks
Ishaan has a craving for sticks. He has N sticks. He observes that some of his sticks are of the same length, and thus he can make squares out of those. He wants to know how big a square he can make using those sticks as sides. Since the number of sticks is large, he can't do that manually. Can you tell him the maximum area of the biggest square that can be formed? Also, calculate how many such squares can be made using the sticks.
1 <= N <= 10^5 1 <= arr[i] <= 10^3
Input is managed for you
Output is managed for you
10 3 3 4 4 3 4 3 1 4 2