|
|
I spent 20 submissions, because of TLE15. I tried many fft implementations. But the error was in my z function Edited by author 10.02.2014 00:44 Use the FFTW (such fast wow) for AC. Thanks, I already got AC with usual FFT (heavily optimized). Could you give some link to FFTW? 3 2 11110001 11110001 11110000 11110000 11110000 If you alter one bit, it will become 11110000 11110000 11110001 So how the answer is 1 2? Shouldn't it be 1 1? Or we have to alter only the first byte? What you suggest changes 2 bits and you want the replacement with minimal number of bits ("And if it is, find the minimum number of bits to alter."). Edited by author 26.10.2013 17:33 Edited by author 26.10.2013 17:36 I have 3 different understandings of the target value: 1. Whole number of bits in all bytes to be changed to make bit substrings equal (any bit(s) of each byte can be changed); 2. The same as p. 1, but only last consecutive bits of byte (suffix) can be changed; 3. The number from the 0..8 range which is the minimum number of bits that can be changed in all bytes. Tests do not clarify this. Which one is right? It's allowed to change only last bit in every byte. image: 00000010 00000001 secret: 00000000 00000011 can they match? Use the FFTW for AC. Edited by author 02.08.2014 17:59 |
|
|