{"published":"2024-09-27 02:16:49","image_url":"https://cdn.user.blog.st-hatena.com/default_entry_og_image/80936665/1687765056723440","blog_title":"\u3051\u3093\u3061\u3087\u3093\u306e\u7af6\u30d7\u30ed\u7cbe\u9032\u8a18\u9332","height":"190","blog_url":"https://drken1215.hatenablog.com/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdrken1215.hatenablog.com%2Fentry%2F2024%2F09%2F27%2F021649\" title=\"\u9244\u5247\u672c A20 - LCS (2Q, \u26054) - \u3051\u3093\u3061\u3087\u3093\u306e\u7af6\u30d7\u30ed\u7cbe\u9032\u8a18\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","title":"\u9244\u5247\u672c A20 - LCS (2Q, \u26054)","url":"https://drken1215.hatenablog.com/entry/2024/09/27/021649","author_name":"drken1215","width":"100%","categories":["\u305d\u306e\u307e\u307e\u899a\u3048\u305f\u3044\u5178\u578b\u554f\u984c","LCS","LCS\u578bDP","AtCoder","\u9244\u5247\u672c","\u9244\u5247\u672cA\u554f\u984c","\u9244\u5247\u672c\u26054","NoviSteps2Q","DP","\u6700\u9069\u5316\u554f\u984c","\u6700\u5927\u30b9\u30b3\u30a2","\u6587\u5b57\u5217","\u90e8\u5206\u5217"],"author_url":"https://blog.hatena.ne.jp/drken1215/","type":"rich","description":"LCS \u3092\u6c42\u3081\u308b DP \u306e\u7df4\u7fd2\u3002\u9244\u5247\u672c\u306e\u554f\u984c\u306a\u306e\u3067\u30b3\u30fc\u30c9\u306e\u307f\u3002 \u554f\u984c\u3078\u306e\u30ea\u30f3\u30af \u554f\u984c\u6982\u8981 2 \u3064\u306e\u6587\u5b57\u5217 \u304c\u4e0e\u3048\u3089\u308c\u308b\u3002 \u306e\u90e8\u5206\u5217\u3067\u3082 \u306e\u90e8\u5206\u5217\u3067\u3082\u3042\u308b\u3088\u3046\u306a\u6587\u5b57\u5217\u306e\u9577\u3055\u306e\u6700\u5927\u5024\u3092\u6c42\u3081\u3088\u3002 \u5236\u7d04 \u30b3\u30fc\u30c9 #include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; vector dp(S.size()+1, vector(T.size()+1, 0)); for (int i = 0; i <= S.size(); i++) { for (int j = 0; j <= T.size\u2026"}