Problem A
K-Inversions
You are given a string
Consider the string BABA. It has two

For each
Input
Each input will consist of a single test case. Note that
your program may be run multiple times on different inputs. The
input will consist of a single line with a string
Output
Output
Sample Input 1 | Sample Output 1 |
---|---|
BABA |
2 0 1 |
Sample Input 2 | Sample Output 2 |
---|---|
BBBBBAAAAA |
1 2 3 4 5 4 3 2 1 |