Yes ot includes penalty. Yes, JAVA is given max memory for reason, irrespective of array/var yoy declare 
You are so helpful. Thank you!
Try learning about big O notation and time complexity. You canc heck geeksforgeeks for this. Roughly, judge executes ~K x 10^7 instructions a second. If N is upto 10^5, then a O(N^2) algorithm will fail as it needs atleast 10^5 x 10^5 = 10^10 instructions.
You dont even need to sort. Just maintain a frequency array, and if any element is coming more than once (2 or 3 times) then include it in answer array. If you go sequentially you wont need to sort answer array as well.
Thank you. 
You no longer need to rely on this thread for answers. You can use “ask the question” feature now. 
You may want to refer to stackoverflow for this question.
i tried but cant get satisfactory ans. i hope will get a help from here
thanks anyway
link : java - how does nextLine discard the input? - Stack Overflow
Its not exactly “discarded”. Its just that there is no variable which is accepting the value, so the scope of the value in “input.next()” ends.
nextLine method doesnt discard the input, it takes the entire line as input. In case again, theres no string to accept that, the input is wasted and it starts reading from next line.
Try this case-
Input- 90
Expected output = 9. If 09 printed, give WA.
Similarly Input=900000000 ,output=9. Leading 0 are not allowed.
Please print “yes” and “no” isntead of “YES” and “NO”. Wrong case= Wrong Answer.
I am not sure but I think the one who takes less attempt to solve that question is placed up
Nahh, just confirmed its irrespective of number of attempts.
nvm solved it
This was converted to a question. You must have lost track.
I registered and made the payment on 15 sept not oct, that was more than a month ago. But I’ll send the screenshot just tp be sure. Thanks .
Soery, misread it. So it had been over a month since payment? Theres DEFINITELY something wrong, since they dont take more than a week in accepting. Did you fill the google doc correctly?
Did, asked them via email 4 times if there is some formalities missing from our side but all i get is wait 3-4 days. I sent those emails oncr a week.