Here is the link to my code - http://www.codechef.com/viewsolution/4313252
Thanks
Limits on n1,n2,n3 are [0,50000] and ID for an individual can be any positive integer
. So it cannot be guaranteed to be less than 50000
. If it is greater than that, your array is running out of limits and so is resulting in this error.
Oh! my bad! yes! totally forgot about that.
Thanks