Problem2411--ABC265C-Belt Conveyor

2411: ABC265C-Belt Conveyor

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description



Sample Input Copy

2 3
RDU
LRU

Sample Output Copy

1 3

HINT

You will move as (1, 1) \to (1, 2) \to (2, 2) \to (2, 3) \to (1, 3)(1,1)(1,2)(2,2)(2,3)(1,3), ending up here, so the answer is (1, 3)(1,3).

Source/Category