Created
February 8, 2015 02:08
-
-
Save ravgoundar/f6282ca1715121d7753c to your computer and use it in GitHub Desktop.
CodinGame - Easy - The Descent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (true) { | |
var inputs = readline().split(' '); | |
var SX = parseInt(inputs[0]); | |
var SY = parseInt(inputs[1]); | |
var maxHeight = 0; | |
var target = null; | |
for (var i = 0; i < 8; i++) { | |
var MH = parseInt(readline()); | |
if (MH >= maxHeight) { | |
maxHeight = MH; | |
target = i; | |
} | |
} | |
if (SX == target) { | |
print('FIRE'); | |
} else { | |
print('HOLD'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment