Problem C. Editor

时间限制 2000 ms   内存限制 128 MB

 

样例输入

复制
8
I 2
I -1
I 1
Q 3
L
D
R
Q 2

样例输出

复制
2
3

样例说明

 The following diagram shows the status of sequence after each instruction: 
          
 

提交

请先 登录

© 2025 FAQs Contact About