## Editorial for DMPG '19 S2 - Code Cracking Crisis

Remember to use this editorial

**only**when stuck, and**not to copy-paste code from it**. Please be respectful to the problem author and editorialist.**Submitting an official solution before solving the problem yourself is a bannable offence.**Author:

First, we find the inverse of the encryption keys— is equal to the position of digit in the -th key.

Then we can decrypt the code from left to right. As we obtain each , we can find by seeing which digit in the -th key would result in an encrypted digit of .

## Comments