Company: Accolite_9oct
Difficulty: medium
Ant's Journey Home Problem Description Once upon a time, in a forest, there lived a little ant named Andy. Andy's cozy anthill was located at a specific spot along the x-axis, a straight path that stretched through the forest. Andy's home was at position x, and he loved to explore the forest, often wandering far from home. However, as dusk fell, it was time for Andy to return to his snug little anthill. To find his way back, Andy had a unique way of traveling: He could march forward by exactly "a" positions or scurry backward by exactly "b" positions. However, there were a few rules and prohibitions on his journey: Andy could not scurry backward twice in a row; it made him dizzy and confused. Certain positions in the forest were marked as dangerous by large red flags. Andy knew he must avoid these prohibited spots at all costs. Andy couldn't scurry to any position beyond the beginning of the forest, marked as position 0. He wasn't a fan of the dark, mysterious areas beyond this startin