Why a I getting a wrong answer, please I can't find the bug in my program?

Here is the problem link:
link text
And here is my program link:
link text

Why are you printing 1 if counta==countb??

Say i have abab , minimum balloons to be colored here is 2. Why print 1?

please upvote , i am new

Ohh shit thanks… I don’t know how I made such a silly mistake.

//