HDU 5590 ZYB's Biology (水题)

#include<bits/stdc++.h>
using namespace std;

#define debug puts("YES");
#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)
#define read(x,y) scanf("%d%d",&x,&y)
#define ll long long

#define lrt int l,int r,int rt
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define root l,r,rt
const int  maxn =5e4+5;
const int mod=1e9+7;
ll powmod(ll x,ll y){ll t; for(t=1;y;y>>=1,x=x*x%mod) if(y&1) t=t*x%mod; return t;}
ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
char s1[105],s2[150];
int n;
map<char,char> mp;
int main()
{
    mp['A']='U',mp['T']='A',mp['C']='G',mp['G']='C';
    int t;scanf("%d",&t);
    while(t--)
    {
        int flag=1;
        scanf("%d",&n);
        scanf("%s",s1);
        scanf("%s",s2);
        for(int i=0;i<n;i++)
        {
            if( s2[i]!=mp[s1[i]] ) {flag=0;break;}
        }
        if(flag) puts("YES");
        else puts("NO");
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_37451344/article/details/82793444