Help in this codeforces problem

The problem link is : Problem - 282C - Codeforces
My solution : #include<bits/stdc++.h> using namespace std; #define fastio ios_ba - Pastebin.com
My approach is that only these operations can happen :
// 11 → 10 01
// 10 → 11
// 01 → 11
// 00 → 00

It is failing on this test case:
11000001
00000001
My ans is “NO” but the given answer is “YES”. How will “11” convert to “00”?

11000001 can be converted into 00000001 in the following way:

11000001
01000001
01100001
00100001
00110001
00010001
00011001
00001001
00001101
00000101
00000111
00000011
00000001

2 Likes