编程介的小学生 2019-02-18 16:27 采纳率: 20.5%
浏览 190

一个有关最长数字子序列方面的算法的问题?用C语言如何解决的

Problem Description
Everyone knows LCS problem:

For example:
str1 = "GCTAT"
str2 = "CGATTA"

the longest common subsequence is "GTT" of them.So you should print "3".

I'm sure you can easily sovle it.So the challenge is coming again.(^_^)

Input
For each case,there are two lines.one is string A,the other is string B.
the string Process to end of file.Each string will have at most 30000 characters.
All the characters are in upper-case.

Output
For each case, output the maximum-length common subsequence.

Sample Input
GCTAT
CGATTA

ABCFBC
ABFCAB

Sample Output
3
4

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料