{"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 class\u003d\"panel_content\"\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e\n 给定序列的子序列是给定序列,其中遗漏了一些元素(可能没有)。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e给定一个序列 X \u003d \u0026lt;x1, x2, ..., xm\u0026gt; 另一个序列 Z \u003d \u0026lt;z1, z2, ..., zk\u0026gt; 是 X 的子序列,如果存在严格递增的序列 \u0026lt;i1, i2, ... ., ik\u0026gt; X 的索引使得对于所有 j \u003d 1,2,...,k, xij \u003d zj。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e例如,Z \u003d \u0026lt;a, b, f, c\u0026gt; 是 X \u003d \u0026lt;a, b, c, f, b, c\u0026gt; 的子序列,索引序列为 \u0026lt;1, 2, 4, 6\u0026gt;。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e给定两个序列 X 和 Y,问题是找到 X 和 Y 的最大长度公共子序列的长度。 \n \u003c/font\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e程序输入来自文本文件。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e文件中的每个数据集都包含两个表示给定序列的字符串。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e序列由任意数量的空格分隔。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e输入数据正确。\u003c/font\u003e\u003cfont style\u003d\"vertical-align: inherit;\"\u003e对于每组数据,程序在标准输出上打印从单独行开始的最大长度公共子序列的长度。 \n \u003c/font\u003e\u003c/font\u003e\u003cbr\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cpre\u003eabcfbc abfcab\nprogramming contest \nabcd mnp\n\u003c/pre\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cpre\u003e4\n2\n0\n\u003c/pre\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003eabcfbc abfcab\nprogramming contest \nabcd mnp\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e4\n2\n0\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}