UKE
查看原帖
UKE
971024
Jerry_zpl楼主2024/4/16 18:03
#include<bits/stdc++.h>
using namespace std;
int main()
{
	cin.tie(0);
	cout.tie(0);
	int t;
	cin>>t;
	while(t--)
	{
		char t;
		string s;
		cin>>s>>t;
		bool flag=false;
		for(int i=0;i<s.size();i++)
		{
			if(s[i]==t&&i%2==0)
			{
				cout<<"YES\n";
				flag=true;
				break;
			}
		}
		if(flag==false) cout<<"NO\n";
	} 
	return 0;
}
2024/4/16 18:03
加载中...