незрозуміло, відстань і шлях - це ж різні речі, формула для визначення відстані між двома точками у тривимірній системі координат дає тільки 20% задачі. Мабуть, все ж варто шукати шлях?
Andremaxico мабуть
Вопрос какойто странный если паук может находится либо на стене либо на полу то обязательно что одна из его координат должны быть равны нулю так почему у нас могут быть все три координаты отличающиеся от нуля?
Lucky123 не обязательно, паук может находиться на противоположной стене, например в комнате 2 \times 2 \times 2 он может бить в координатах (2, 1, 1)
got the 100% nice
i dont get it, can spider jump on the fly? for example what happens if spider is on the ceiling can it jump on the fly or it should go across walls
Khayyam7 normally if spider could jump it would have been in the statement. The spider cannot jump and must cross one of the walls to get to the floor. Furthermore, in the statement it says the spider is positioned on the wall or on the floor.
Khayyam7 spider cant be on ceiling cuz its said he might be on walls or ground, but nothing has been said about ceiling.
I received a processing time error, but such an error should not have occurred, the question is problematic :)
@user470803 note that values are provided in two lines, three integers in the first line and five integers in the second. Make sure you are reading input data correctly using "Run" mode.