eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Erase Securely

Erase Securely

\includegraphics{https://static.e-olymp.com/content/8a/8a75f501cfae0e8a91e49129516775f184d7f497.jpg} Jon Marius is the computer expert at his company and has now been tasked to find some software for erasing data properly. It is very important that the data should not be recoverable afterwards, so it should be overwritten on the hard drive several times. Unable to find any free program up to the task, Jon Marius decides to write such a program himself. The user interface is simple, it only asks for the file to be destroyed and \textbf{n}, the number of times it should be overwritten. This number can range from \textbf{1} (quick deletion) to \textbf{20} (maximum security). Jon Marius processes the file bit by bit and does not consider writing a zero where there was already a zero as really overwriting. So for each of the \textbf{n }sweeps, he overwrites each zero with a one and each one with a zero. Jon Marius knows that independent testing is important, so he has asked you to write the verification routine. He will not listen to your objections to the algorithm so eventually you give in. \InputFile The first line of the input contains a single integer \textbf{1} ≤ \textbf{N} ≤ \textbf{20}. The two following lines each contain a string containing only the characters \textbf{0} and \textbf{1}. The first of these lines represent the bits of the file before deletion and the second the bits on the same position on the hard drive after the file has been deleted. The length of these strings are the same and between \textbf{1} and \textbf{1000} characters. \OutputFile Output a single line containing either the words "\textbf{Deletion succeeded}" if each bit is switched \textbf{N} times or "\textbf{Deletion failed}" if this is not the case.
Ліміт часу 1 секунда
Ліміт використання пам'яті 128 MiB
Вхідні дані #1
1
10001110101000001111010100001110
01110001010111110000101011110001
Вихідні дані #1
Deletion succeeded
Вхідні дані #2
20
0001100011001010
0001000011000100
Вихідні дані #2
Deletion failed
Джерело ACM ICPC NCPC 2013, 5th October 2013