Getting blank answer on submitting but correct answer on testing with same input


#1

When I submit, site says that my submission is giving blank result for below input. But when I run it as custom test case, I see correct answer.

aabbbabaaabbbabaabaab
9 bababbbb bbbabaa abbb a aabbaab b babaabbbb aa bb


#2

Global Variables don’t work in submit but work in custom input.Huge bug of this site.Even test cases contain whitespace at end and you have to waste your time debugging what went wrong only to find this. Very poor judge.