For problem http://codeforces.com/contest/518/problem/B i submitted the solution.
Here is ideone link to the solution-
http://ideone.com/ucGGgA
In Ideone output for testcase 4 is diffrent from output in Codeforces.
Input -
zzzzz
ZZZZZ
Output-
in Ideone - 0 5
In Codeforces - 5 0
Can someone please help me understand this?
Are you sure that your array mp contains zeroes?
I am initializing it to 0 in the start
Only 100 elements