UVa 118 - Mutant Flatworld Explorers

Summary
Straightforward Simulation problem.

Explanation
This one is a very trivial simulation problem. Follow all the instructions carefully, and it should be easy. A common mistake is mixing up x and y, and checking the border.

Gotchas

 * Don't forget "Robot scent". If a robot "lost" in position (x,y), it will left a "scent" there so that if another robot "lost", it won't lost in position (x,y) again. Especially attend to the corners.

Input
5 3 1 1 E RFRFRFRF 3 2 N FRRFLLFFRRFLL 0 3 W LLFFFLFLFL

Output
1 1 E 3 3 N LOST 2 3 S

Solution

 * C++: http://acm-solution.blogspot.com/2010/11/acm-uva-118-mutant-flatworld-explorers.html
 * Code All the Problems