{"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":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\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\u003eThe 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 \u003cbr\u003e \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cpre\u003eabcfbc abfcab\nprogramming contest \nabcd mnp\u003c/pre\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cpre\u003e4\n2\n0\u003c/pre\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003eabcfbc abfcab\nprogramming contest \nabcd mnp\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e4\n2\n0\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"动态规划\n\u003cp\u003e题目中字符串长度不超过1000\u003c/p\u003e"}}]}