Language: C++

#include <iostream>
#include <vector>
using namespace std;
#define MAX_SEQ 1000

int main() {
  int n; cin >> n;

  for(int i=0;i<n;i++) {
    int subseq_len = 0;
    char seq1[MAX_SEQ+1];
    char seq2[MAX_SEQ+1];
    vector<char> seq_sub;
    cin >> seq1;
    cin >> seq2;

    for(int seq1_it=0;seq1[seq1_it]!='\0';seq1_it++) {
      vector<char>::iterator it = find(seq_sub.begin(), seq_sub.end(), seq1[seq1_it]);
        if (it == seq_sub.end()) {
          seq_sub.push_back(seq1[seq1_it]);
        }
    }
    for(int seq2_it=0;seq2[seq2_it]!='\0';seq2_it++) {
      vector<char>::iterator it = find(seq_sub.begin(), seq_sub.end(), seq2[seq2_it]);
        if (it != seq_sub.end()) {
          seq_sub.erase(it);
          subseq_len++;
        }
    }
    cout << subseq_len << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:39: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, char&)'
   18 |       vector<char>::iterator it = find(seq_sub.begin(), seq_sub.end(), seq1[seq1_it]);
      |                                   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:18:39: note:   '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   18 |       vector<char>::iterator it = find(seq_sub.begin(), seq_sub.end(), seq1[seq1_it]);
      |                                   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:24:39: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, char&)'
   24 |       vector<char>::iterator it = find(seq_sub.begin(), seq_sub.end(), seq2[seq2_it]);
      |                                   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:24:39: note:   '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   24 |       vector<char>::iterator it = find(seq_sub.begin(), seq_sub.end(), seq2[seq2_it]);
      |                                   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~