Marks :100
: 2 | : 1
Raman is a farmer.He wants to buy some pipes of distinct sizes. There were N pipes in the ship and some of them are of the same size. The size of the pipe has been marked on the pipe using some number nums in the form of a bar code.
Write a program that scans all the bar codes and prints the number of pipes Raman can get from the shop.
The first line of input contains N ($$$1 \le N \le 3*10^4$$$)
The second line contains N pipes separated by a single space ($$$-10^4 \le a_i \le +10^4$$$)
The first line print the number of pipes after scanning all the barcodes.
The second line of output contains pipe sizes after scanning in ascending order
3 1 1 2
2 1 2
For sample input 1 the given number of pipes is 3 i.e 1,1,2 after scanning all the bar codes first pipe bar code and second pipe bar codes are the same. So removing one of then Raman get the two pipes of size 1 and 2
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.