|
|||
Breaking a Quantum Cryptography MachineDuring the Third Interstellar War, the Secret Service tasked you with cracking the enemy's quantum cryptography machine that protects the enemy's communications. The last captured cryptographic messages consist of instructions intercepted by the Secret Service and their corresponding solutions. The correctness of the messages have been verified by the Secret Service. Find out the operating principle of the quantum machine using the messages broken so far, and reimplement it using C/C++. Captured Instructions #1
Solution #1
Captured Instructions #2
Solution #2
Captured Instructions #3
Solution #3
Input Specification
The input contains a sequence of similar instructions to those in the captured messages, one
instruction per line. The input may be considered correct in all cases. There are no
conflicting instructions or instructions that cannot be executed at any point in time. All
intermediary numbers as well as the results are integers that fit into the range of the
Output SpecificationPrint one line to the standard output, containing the solution of the sequence of instructions read from the input. |
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |