Problem3339--【Div3】模拟+数学练习 - 机器人

3339: 【Div3】模拟+数学练习 - 机器人

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

Description

Sample Input Copy

6
3 2 6
LLR
2 -1 8
RL
4 -2 5
LRRR
5 3 7
LRRLL
1 1 1
L
3 -1 4846549234412827
RLR

Sample Output Copy

1
4
1
0
1
2423274617206414

HINT

Source/Category