Pintu and Fruits----CHPINTU

PLEASE HELP ME
https://www.codechef.com/viewsolution/33989555

m[a[I]] += b[i]
Thats it :wink:

For reference only: CodeChef: Practical coding for everyone

sorry i didn’t understand…

U need to use map/dictionary to keep a count of number of objects.Then print the item values(no of objects)
can look over on stack overflow on implementing dictionary/counter in python or map in cpp.