FOOLS18E-Editorial

PROBLEM LINK:

Practice

Contest

Author: Ayush Rai

Tester: Aman Shahi

First To Solve: Anton Älgmyr

DIFFICULTY:

Special Problem : Easy-Medium

PROBLEM:

As Global Weekend is going on, Bidit decided to do something LARGER THAN life and travel the world. After visiting several other places, now he is standing in front of the door of the Great Pyramids. To explore more, he wants to enter the Pyramid but there is a problem that the door is locked. The door has multiple passwords which are in the form of strings containing only lowercase English alphabet ranging from ‘a’ to ‘z’. Bidit is carrying a bag which contains an integer array. Bidit might want to use the array to unlock the door. After traveling for so long, Bidit is tired. he wants you to determine from the given input whether the door can be unlocked or not.

HINTS:

The name of the question hinted towards ASCII (Ask Key). The approach to the question revolved around deciphering the array that Bidit has in his bag. The array is a cumulative cipher. There are multiple passwords for the door (n given input strings). If any of the passwords which are in the form of strings when cumulated according to their ASCII values give the same array that Bidit has in his bag, then he would be able to open the door, otherwise not.

SOLUTION

here