Minimum flips

Revision en2, by ZeroCoolCorp, 2023-07-15 23:09:51

Given two arrays X and Y both with size N and consisting of only 0's and 1's.We need to find the minimum number of bit flips to get from X to Y, but at any point we cant have 3 of the same bits next to each other(ex. 010001 and 101110 are forbidden).

Can someone help me with this problem it was on a macedonian olympiad.

Constraints: N <= 6000

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ZeroCoolCorp 2023-07-15 23:09:51 6
en1 English ZeroCoolCorp 2023-07-15 23:08:26 364 Initial revision (published)