Company: Walmart sparkplug
Difficulty: medium
Collecting Stones Alex has a collection of n stones with ai numbers engraved on each stone. One day, he created his own game called "good collection". In this game, a collection of stones is considered good if the difference between the highest and the lowest numbers engraved on the stone is equal to the total number of stones in the collection. Given the list of 'n' stones with distinct numbers engraved on each one of them, help Alex determine how many good collections he can make from the given list. Note: A collection of stones is created by removing some or none of the stones from the list of stones. Input Format The first line of input contains an integer 'n' representing the total number of stones in the list. The second line of input contains 'n' space separated integers representing the list of stones ai. Output Format Print the maximum number of good collections that can be formed from the given list of stones. Constraints 2 ≤ n ≤ 10 6 1 ≤ ai ≤ 10 9 Sample Test Cases Sample Te