Follow the steps X88230


Statement
 

pdf   zip

html

Input

The first line defines the number of points that the droid must follow. The content of each line, after the first one, is a pair of integer values defining a (x, y) point.

Output

A pair of lines defining how to reach the corresponding (x, y) point. First line for the movement in Y-axis (North-South) and second line for the movement in X-axis (West-East).

Public test cases
  • Input

    4
    3 5
    2 5
    2 7
    9 5
    

    Output

    Walk 5 steps north
    Walk 3 steps east
    Walk 1 steps west
    Walk 2 steps north
    Walk 2 steps south
    Walk 7 steps east
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    C++
    User solutions
    C++ Haskell Java Python