Eliminating Balls With Merging (Easy Version)

Problem Name:
Eliminating Balls With Merging (Easy Version)
Site:CodeForces
Links:
Tags:
Problem setters: