EDIT  Edit Distance Again
As any experienced programmer must know the famous problem of "Edit Distance", however this problem is considered an “alternating chain” if you have alternately made case sensitive.
Example: "AaAaAbB" "B" "a" "aBaCdEf"
Alternating chains are considered in our problem.
We only have one operation that is permitted in exchange for a lower or upper case Latin letter.
Given a string giving the minimum number of changes to be considered an alternating chain.
Input
A string with no spaces line containing only uppercase and lowercase letters, one for each line of maximum length 10^3 until end of file
Output
For each line print the minimum number of changes to the chain is a "chain alternately"
Example
Input: AaAaB ABaa a Output: 0 2 0
hide comments
khoaph:
20180701 03:09:23
Can anyone explain why the result for test case "ABaa" is 2?


karan_yadav:
20180525 07:36:34
Solved it! But the leaderboard is filled with 0.00s time while I got 0.01s even though my solution is O(n).


steady_bunny:
20170530 17:10:25
@daman007


daman007:
20170512 21:53:43
Number of testcases is not given here, So can anyone tell me how can I stop taking input


cake_is_a_lie:
20170303 20:27:55
The statement is of very poor quality, but got AC first try so it's not bugged. 

vivek4434:
20170222 15:52:02
Again and again it is showing WA ??


apurvgs:
20170124 15:25:34
Last edit: 20170124 15:51:15 

dwij28:
20160627 00:10:35
This is not even remotely a DP problem. Pure Adhoc. 

epsilon:
20160227 17:36:45
it's an insult to dp if this belongs to dp category !!! :P


vedang:
20151201 12:52:40
Why is this problem even tagged as DP? It's should be adhoc. 
Added by:  Paulo Costa 
Date:  20120201 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  PUCP 