BestCoder Round #65 1001 ZYB's Biology HDU5590

53 篇文章 0 订阅
49 篇文章 0 订阅


ZYB's Biology

                                                           Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)
                                                                                      Total Submission(s): 522    Accepted Submission(s): 387


Problem Description
After getting  600  scores in  NOIP   ZYB(ZJ267)  begins to work with biological questions.Now he give you a simple biological questions:
he gives you a  DNA  sequence and a  RNA  sequence,then he asks you whether the  DNA  sequence and the  RNA  sequence are 
matched.

The  DNA  sequence is a string consisted of  A,C,G,T ;The  RNA  sequence is a string consisted of  A,C,G,U .

DNA  sequence and  RNA  sequence are matched if and only if  A  matches  U , T  matches  A , C  matches  G , G  matches  C  on each position. 
 

Input
In the first line there is the testcase  T .

For each teatcase:

In the first line there is one number  N .

In the next line there is a string of length  N ,describe the  DNA  sequence.

In the third line there is a string of length  N ,describe the  RNA  sequence.

1T10 , 1N100
 

Output
For each testcase,print  YES  or  NO ,describe whether the two arrays are matched.
 

Sample Input
  
  
2 4 ACGT UGCA 4 ACGT ACGU
 

Sample Output
  
  
YES NO
 

Source


出题人直接按照题意模拟即可.


#include 
   
   
    
    
#include 
    
    
     
     
#include 
     
     
      
      
using namespace std;
const int N=102;
char a[N],b[N];
int main()
{
    int n,T,i,flag;
    scanf("%d",&T);
    while(T--)
    {
        scanf("%d",&n);
        scanf("%s%s",a,b);
        for(i=0; i
      
      
     
     
    
    
   
   



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值