Why can't I flip all the 1's in the string, that way number of '01' substrings == number of '10' substrings == 0 ?
I have followed a pattern for practicing problems. When I started I used to practice 800 rating problems, then when I was able to solve A problem in 2-3 Div2 contests, I moved on to solve 1000-1100 rating problems and when I was able to solve B problem in 2-3 Div2 contests I moved on 1200-1300 rating problems.
But, I have noticed that most of Div2 C problems are of 1600-1700 rating (I may be wrong). So, should I start solving 1600-1700 rating problems? Also, will jumping from 1300 to 1700 be actually beneficial for me?
Highest rating: 1201
Current rating: 1159
Number of 1200-1300 problems solve: 70(1200), 15(1300)
Only make the first element of vector A less than vector B. So if B < A, iterate over A and find the first element smaller than B by this we will also know the number of swaps required to change the first element of A. Then iterate over B and find the first element greater than A by this we will know the number of swaps required to change the first element of B. Print the minimum number of swaps.
solution Link ,546th test case fails.