A problem on bit strings

Правка en1, от mahmud2690, 2017-02-16 20:01:27

I am recently faced with the following problem. You are given binary string a and b where 1 <= length(a) <= length(b) <= 10^5. Let length(a) = n. Now we are required to find the smallest binary-valued substring S of b with length n where XOR(S, a) is minimum. I thought a solution with bitsets which may avoid TL, but i couldn't made it up. Can anybody help me to solve this, please?

Example: Input: 1101 1011000 Output: 1100

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский mahmud2690 2017-02-16 20:01:27 460 Initial revision (published)