Codeforces Round #617 (Div. 3) C.Yet Another Walking Robot
Codeforces Round #617 (Div. 3) C.Yet Another Walking Robot There is a robot on a coordinate plane. Initially, the robot is located at the point (0,0). Its path is described as a string s of length n consisting of characters ‘L’, ‘R’, ‘U’, ‘D’. Each of these characters corresponds to some move: ‘L’ (left): means that the robot moves from the point (x,y) to the point (x−1,y); ‘R’ (right): means that the robot moves from the point (x,y) to the point (x+1,y); ‘U’ (up): means that the robot moves from the point (x,y) to the point (x,y+1); ‘D’ (down): means that the robot moves from the point (x,y)