跪求一个C程序,要求有算法分析

来源:百度知道 编辑:UC知道 时间:2024/05/30 08:28:07
不必很复杂,当然也别太简单,并简单说说有什么用
这个有点简单了 有没有类似于学生成绩管理系统这样的C程序,要有算法分析的,有的话发一个给我,好的话,我会追加分数。谢谢啦

动态规划(SOJ1978)
一、题目描述:
Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitrarily, but each must stay in its original order.

For example, consider forming "tcraete" from "cat" and "tree":

String A: cat
String B: tree
String C: tcraete

As you can see, we can form the third string by alternating characters from the two strings. As a second example, consider forming "catrtee" from "cat" and "tree":

String A: cat
String B: tree
String C: catrtee

Finally, notice that it is impossible to form "cttaree" from "cat" and "tree".
Input
The first line of input contains a single positive integer from 1 through 1000. It represents the number of data sets to follow. The processing for e