Hello,
I have spent a good amount of time trying to debug 587C. However, I am getting WA Test 30.
There seems to be something wrong with merging (not necessarily the method itself), as in my answer I end up outputting a duplicate of each number in the second line of the Output on test 30
10 1 1 4 4 5 5 6 6 8 8
However, I believe I designed my code so that the code should not be merging overlapping vectors. If someone could be so kind as to help me pinpoint the error, I would be very thankful.