编程介的小学生 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 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥15 stable diffusion
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误