Language: C++

#include<bits/stdc++.h>
usind namespace std;
int main()
{
  string x,y;
  int m,n;
  cin >> x >> y;
  m = x.length();
  n = y.length();
  int dp[n+1][m+1];
  int i,j;
  for(i=0;i<m;i++)
  {
    for(j=0;j<n;j++)
    {
      if(i==0 || j==0)
        dp[i][j]=0;
      else if
      {
        if(x[i-1] == y[j-1])
          dp[i][j] = dp[i-1][j-1]+1;
      }
      else
      {
        dp[i][j] = max(dp[i-1][j],dp[i][j-1]);
      }
    }
  }
  if(dp[n][m] == 0)
    cout <<" ";
  stack <char> s;
  for(i=n,j=m;i>0,j>0;)
  {
    if(dp[i][j] != dp[i-1][j] && dp[i][j] != dp[i][j-1])
    {
      s.push(x[i]);
      i--;
      j--;
    }
    else
    {
      if(dp[i-1][j] > dp[i][j-1])
        i--;
    }
  }
  while(!s.empty())
  {
    cout << s.top();
    s.pop();
  }
  return 0;
}
      
      
          

Compiler output:
a.cc:2:1: error: 'usind' does not name a type
    2 | usind namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string x,y;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> x >> y;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:10: error: 'x' was not declared in this scope
    7 |   cin >> x >> y;
      |          ^
a.cc:7:15: error: 'y' was not declared in this scope
    7 |   cin >> x >> y;
      |               ^
a.cc:19:7: error: expected '(' before '{' token
   19 |       {
      |       ^
      |       (
a.cc:23:7: error: 'else' without a previous 'if'
   23 |       else
      |       ^~~~
a.cc:25:20: error: 'max' was not declared in this scope; did you mean 'std::max'?
   25 |         dp[i][j] = max(dp[i-1][j],dp[i][j-1]);
      |                    ^~~
      |                    std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:30:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |     cout <<" ";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:31:3: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
   31 |   stack <char> s;
      |   ^~~~~
      |   std::stack
In file included from /usr/include/c++/14/stack:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:160:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: 'std::stack' declared here
   99 |     class stack
      |           ^~~~~
a.cc:31:10: error: expected primary-expression before 'char'
   31 |   stack <char> s;
      |          ^~~~
a.cc:36:7: error: 's' was not declared in this scope
   36 |       s.push(x[i]);
      |       ^
a.cc:46:10: error: 's' was not declared in this scope
   46 |   while(!s.empty())
      |          ^
a.cc:48:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   48 |     cout << s.top();
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~