{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e \n \u003cdiv\u003e\n \u0026nbsp;欢迎来到14网络工程专业算法课程设计动态规划专项练习。~\u0026nbsp;\n \u003cimg\u003e\n \u003cbr\u003e \u0026nbsp;\n \u003cbr\u003e 还记得我们算法课本上有一道例题就是最大公共子序列问题(LONGEST\u0026nbsp;COMMON\u0026nbsp;\n \u003cspan\u003eSEQUENCE)\u003c/span\u003e.\n \u003cbr\u003e \n \u003cspan\u003e当时我们的张老师讲解了好大一会呢。\u003c/span\u003e\n \u003cbr\u003e \n \u003cspan\u003e那么14网络的小伙伴们,实战来了。\u003c/span\u003e\n \u003c/div\u003e \n\u003c/div\u003e \n\u003cdiv\u003e\n A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X \u003d \u0026lt;x1, x2, ..., xm\u0026gt; another sequence Z \u003d \u0026lt;z1, z2, ..., zk\u0026gt; is a subsequence of X if there exists a strictly increasing sequence \u0026lt;i1, i2, ..., ik\u0026gt; of indices of X such that for all j \u003d 1,2,...,k, xij \u003d zj. For example, Z \u003d \u0026lt;a, b, f, c\u0026gt; is a subsequence of X \u003d \u0026lt;a, b, c, f, b, c\u0026gt; with index sequence \u0026lt;1, 2, 4, 6\u0026gt;. Given two sequences X and Y the problem is to find the length of the maximum-length common subsequence of X and Y.\n \u003cbr\u003e The program input is from a text file. Each data set in the file contains two strings representing the given sequences. The sequences are separated by any number of white spaces. The input data are correct. For each set of data the program prints on the standard output the length of the maximum-length common subsequence from the beginning of a separate line.\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n\u003cspan\u003eabcfbc\u003c/span\u003e \u003cspan\u003eabfcab\u003c/span\u003e\r\nprogramming contest \r\n\u003cspan\u003eabcd\u003c/span\u003e \u003cspan\u003emnp\u003c/span\u003e\u003c/pre\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\n4\r\n2\r\n0\u003c/pre\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n\u003cspan\u003eabcfbc\u003c/span\u003e \u003cspan\u003eabfcab\u003c/span\u003e\r\nprogramming contest \r\n\u003cspan\u003eabcd\u003c/span\u003e \u003cspan\u003emnp\u003c/span\u003e\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\n4\r\n2\r\n0\u003c/pre\u003e"}}]}