seekworser's Library

This documentation is automatically generated by online-judge-tools/verification-helper


Project maintained by seekworser Hosted on GitHub Pages — Theme by mattgraham

:heavy_check_mark: online_test/AOJ/ALDS_1_10_C.test.cpp

Depends on

Code

#define PROBLEM "https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_10_C"
#include "competitive/std/std.hpp"
#include "competitive/algorithm/longest_common_subsequence.hpp"
#include "competitive/std/io.hpp"
int main() {
    int n;
    cin >> n;
    rep(i, n) {
        string s,t;
        cin >> s >> t;
        vector<char> sv, tv;
        rep(i, sz(s)) sv.push_back(s[i]);
        rep(i, sz(t)) tv.push_back(t[i]);
        cout << lcs(sv, tv).size() << endl;
    }
}
Back to top page