#4~#6WA,#7~#10TLE求助
查看原帖
#4~#6WA,#7~#10TLE求助
797229
inarticulate_stupid楼主2023/9/20 16:27
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
string s,t;
ll T,n,q,p,o;
char c;
signed main(){
	cin>>T;
	while(T--){
		cin>>n>>q;
		cin>>s>>t;
		if(s==t)cout<<"Yes\n";
		else cout<<"No\n";
		for(int i=1;i<=q;i++)
		{
			cin>>o>>p>>c;
			if(o==0)s[p]=c;
			else t[p]=c;
			if(s==t)cout<<"Yes\n";
			else cout<<"No\n";
		}
	}
	return 0;
}

开了O2都过不去

2023/9/20 16:27
加载中...