Junior 2 — Wow much parking lot
Griffy has made it past all of Don Mills's plushies, and has ended up in their parking lot! However, having bumped into so many plushies, Griffy's mind is not very clear. After a while strolling around, instead of reaching the school Griffy is now lost! Please help Griffy find where he ended up! Griffy started at the relative position , and you know the sequence of moves he took. Griffy took moves, each move consisting of a pair: (direction) and (distance). Where in Don Mills could Griffy have possibly ended up?
Note: coordinate format will be . Going north increases the value, going east increases the value, and the opposite is true for south and west.
The first line will contain a single integer .
Next lines will contain pairs of commands: and on separate lines.
will be one of four possible directions:
East (capitalized, no spaces).
will be an integer .
One line, the coordinates where Griffy ends up, space separated.
3 North 1 South 2 East 5