当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
You are given a string and supposed to do some string manipulations.
The first line of the input contains the initial string. You can assume that it is non-empty and its length does not exceed 1,000,000.
The second line contains the number of manipulation commands N (0 < N ≤ 2,000). The following N lines describe a command each. The commands are in one of the two formats below:
All characters in the input are digits or lowercase letters of the English alphabet.
For each Q command output one line containing only the single character queried.
ab 7 Q 1 I c 2 I d 4 I e 2 Q 5 I f 1 Q 3
a d e
时间上限 | 内存上限 |
1000 | 131072 |