Wrong o/p of code - subarrays with distinct elements

https://ide.codingblocks.com/s/296801 I made the code as per as discussed in hint video but still not giving correct output. Please check the code and correct it my commenting.

commented mistakes in your code look at this https://ide.codingblocks.com/s/297136