Help in this codeforces problem

The problem link is : https://codeforces.com/problemset/problem/282/C
My solution : https://pastebin.com/umhVBtyM
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