60pts,TLE了4个点,求调
查看原帖
60pts,TLE了4个点,求调
1323415
wky_wsy_楼主2024/8/29 18:49

可能是技术原因导致了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;
}
2024/8/29 18:49
加载中...