Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <cmath>
#include <ctime>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
//boost
/*
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
*/
/*
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
*/
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
 
#define int long long
#define endl "\n"
#define all(v)  v.begin(),v.end()
#define fir first
#define sec second
#define m_p make_pair
#define m_t make_tuple
#define rep(i,n)  for(int i=0; i<(int) (n); i++)
typedef pair<int, int> P;
typedef long double ld;
typedef long long ll;
template<class T> using PQ_inv = priority_queue<T, vector<T>, greater<T>>;
 
const double pai = 3.1415926535897;
const ll mod = 10007;
const int INF = 1000000021;
const ll LINF = 2000000000000000000;
const int MAX = 510000;
const ll MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
 
 
// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {vector<int>vec(1100000,1);
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}
//n個を1個以上のx組のグループに分ける重複組み合わせはcom(n-1,x-1)
long long COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
ll PER(int n, int k) {
	if (n < 0 || k < 0) return 0;
	if (n < k) return fac[n];
	return fac[n] * finv[n - k] % mod;
}
 
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}
long long modpow(int a, int n) {
	int res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}
 
struct edge {
	int to, cost;
};
edge m_e(int xx, int yy) {
	edge ed;
	ed.to = xx;
	ed.cost = yy;
	return ed;
}
//x未満の要素数を返す二分探索関数
int b_s(vector<int>& vec, int xx) {
	return lower_bound(all(vec), xx) - vec.begin();
}
template<class T>void vecout(vector<T>& vec) { for (T t : vec) cout << t << " "; cout << endl; }
template<class T>void vecin(vector<T>& vec) { for (int i = 0; i < vec.size(); i++) cin >> vec[i]; }
bool chmax(int& xx, int yy) {
	if (xx < yy) {
		xx = yy;
		return true;
	}
	return false;
}
bool chmin(int& xx, int yy) {
	if (xx > yy) {
		xx = yy;
		return true;
	}
	return false;
}
 
double dist(int x, int y) {
	return sqrt(x * x + y * y);
}
 
double dist(int xx1, int xx2, int yy1, int yy2) {
	return sqrt(abs(xx1 - xx2) * abs(xx1 - xx2) + abs(yy1 - yy2) * abs(yy1 - yy2));
}
 
ll mypow(int nn, int kk) {
	ll xx = 1;
	rep(i, kk) {
		xx *= nn;
	}
	return xx;
}
 
int gcd(int xx, int yy) {
	int p = xx;
	int q = yy;
	if (q > p)swap(p, q);
	while (p % q != 0) {
		p %= q;
		swap(p, q);
	}
	return q;
}
 
int lcm(int xx, int yy) {
	return xx * yy / gcd(xx, yy);
}
 
bool prime(int xx) {
	if (xx <= 1) {
		return 0;
	}
	for (int i = 2; i * i <= xx; i++) {
		if (xx % i == 0) {
			return 0;
		}
	}
	return 1;
}
 
 int f(int xx){
	 int a=xx,t=0;
	 while(a>=1){
		 t+=a%10;
		 a/=10;
	 }
	 return t;
 }

signed main() {
	string s,t,ans;
	cin>>s>>t;
	vector<vector<int>>vec(s.size()+1,vector<int>(t.size()+1)),vec2(s.size()+1,vector<int>(t.size()+1));
	for(int i=1; i<=s.size(); i++){
		for(int j=1; j<t.size(); j++){
			if(s[i-1]!=t[j-1]){
				if(vec[i][j-1]<=vec[i-1][j]&&vec[i-1][j-1]<=vec[i-1][j]){
					vec[i][j]=vec[i-1][j];
					vec2[i][j]=1;
				}
				else if(vec[i-1][j]<=vec[i][j-1]&&vec[i-1][j-1]<=vec[i][j-1]){
					vec[i][j]=vec[i][j-1];
					vec2[i][j]=2;
				}
				else if(vec[i-1][j]<=vec[i-1][j-1]&&vec[i][j-1]<=vec[i-1][j-1]){
					vec[i][j]=vec[i-1][j-1];
					vec2[i][j]=3;
				}
			}
			else{
				if(vec[i][j-1]<=vec[i-1][j]&&vec[i-1][j-1]+1<=vec[i-1][j]){
					vec[i][j]=vec[i-1][j];
					vec2[i][j]=1;
				}
				else if(vec[i-1][j]<=vec[i][j-1]&&vec[i-1][j-1]+1<=vec[i][j-1]){
					vec[i][j]=vec[i][j-1];
					vec2[i][j]=2;
				}
				else if(vec[i-1][j]<=vec[i-1][j-1]+1&&vec[i][j-1]<=vec[i-1][j-1]+1){
					vec[i][j]=vec[i-1][j-1]+1;
					vec2[i][j]=4;
				}
			}
		}
	}
	P fi=s.size(),se=t.size();
	while(1){
		if(vec2[fi][se])
		
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:220:20: error: conversion from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to non-scalar type 'P' {aka 'std::pair<long long int, long long int>'} requested
  220 |         P fi=s.size(),se=t.size();
      |              ~~~~~~^~
a.cc:220:32: error: conversion from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to non-scalar type 'P' {aka 'std::pair<long long int, long long int>'} requested
  220 |         P fi=s.size(),se=t.size();
      |                          ~~~~~~^~
a.cc:222:24: error: no match for 'operator[]' (operand types are 'std::vector<std::vector<long long int> >' and 'P' {aka 'std::pair<long long int, long long int>'})
  222 |                 if(vec2[fi][se])
      |                        ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; reference = std::vector<long long int>&; size_type = long unsigned int]'
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1128:28: note:   no known conversion for argument 1 from 'P' {aka 'std::pair<long long int, long long int>'} to 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'}
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1147:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; const_reference = const std::vector<long long int>&; size_type = long unsigned int]'
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1147:28: note:   no known conversion for argument 1 from 'P' {aka 'std::pair<long long int, long long int>'} to 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
a.cc:224:9: error: expected primary-expression before '}' token
  224 |         }
      |         ^