题解 | #字符串操作#
字符串操作
https://www.nowcoder.com/practice/06a5336b64e3481fbbcc1f7d5cba548d
n,m = map(int,input().split(' ')) s = input() for i in range(m): l,r,c1,c2 = input().split(' ') tem = s[:int(l)-1]+s[int(l)-1:int(r)].replace(c1,c2)+s[int(r):] s = tem print(s)