可能是技术原因导致了4个点TLE
#include <iostream>
#include <string>
using namespace std;
int main(){
int T,o,p,n,q;
char c;
string s,t;
cin>>T;
while(T--){
cin>>n>>q>>s>>t;
if(s==t) puts("Yes");
else puts("No");
if(q!=0){
while(q--){
cin>>o>>p>>c;
if(o) t[p-1]=c;
else s[p-1]=c;
if(s==t) puts("Yes");
else puts("No");
}
}
}
return 0;
}