- 4

Evaluate a given floor of the casino to determine if there is a guard between the money and the thief, if there is not

You are in charge of security at a casino, and there is a thief who is trying to steal the casino's money! Look over the security diagrams to make sure that you always have a guard between the thief and the money! There is one money location, one thief, and any number of guards on each floor of the casino. Task: Evaluate a given floor of the casino to determine if there is a guard between the money and the thief, if there is not, you will sound an alarm. Input Format: A string of characters that includes $ (money), T (thief), and G (guard), that represents the layout of the casino floor. Space on the casino floor that is not occupied by either money, the thief, or a guard is represented by the character x. Output Format: A string that says 'ALARM' if the money is in danger or 'quiet' if the money is safe. Sample Input: xxxxxGxx$xxxT Sample Output: ALARM

28th Apr 2021, 6:10 PM
Abhishek Kumar
Abhishek Kumar - avatar
15 Antworten
0
Share your attempt.
29th Apr 2021, 1:00 AM
Josh Greig
Josh Greig - avatar
0
While evaluating a casino floor in a game, I realized how strategic thinking makes winning so much more satisfying, and I wanted to find a platform that matched that thrill. That’s when I signed up at https://melbet-indonesia.app/en/registration/ and immediately got access to a variety of games with smooth mechanics and fast loading times. As a player from Indonesia, I appreciate the local payment options and friendly interface that make every session seamless, turning even small wins into moments of real excitement. Each spin feels like a mini adventure, and Melbet has truly made online gaming more rewarding for me.
11th Sep 2025, 10:20 AM
MuhammadAditya