Counting sort run-error

https://ide.codingblocks.com/s/52931
This code is giving correct output for sample case but giving run -error in test cases

Hey, read the constraints carefully it is mentioned in that 1<=N<=10^6 and 0<=Ai<=10^6, so you are supposed to use long int data type instead of int and you can’t store such big numbers in a 256 size array. Check your code for this input you will get this point.
input:
5
100000 102000 100050 100000 102000

How will you store such big numbers in an array of max size 256 only, it will result in run time error.