Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namesapce std;

int main(){
  string x,  y;
  cin >> x >> y;
  sort(x.begin(), x.end());
  sort(y.begin(), y.end(), greater<char>());
  
  int f = 1;
  for(int i = 0; i < min(x.size(), y.size()); i++){
    if(x[i] - 'a' > y[i] - 'a') f = 0;
  }
  if(f) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'namesapce'
    5 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string x,  y;
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> x >> y;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 'x' was not declared in this scope
    9 |   cin >> x >> y;
      |          ^
a.cc:9:15: error: 'y' was not declared in this scope
    9 |   cin >> x >> y;
      |               ^
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   10 |   sort(x.begin(), x.end());
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:11:28: error: 'greater' was not declared in this scope; did you mean 'std::greater'?
   11 |   sort(y.begin(), y.end(), greater<char>());
      |                            ^~~~~~~
      |                            std::greater
In file included from /usr/include/c++/14/string:49:
/usr/include/c++/14/bits/stl_function.h:353:12: note: 'std::greater' declared here
  353 |     struct greater;
      |            ^~~~~~~
a.cc:11:36: error: expected primary-expression before 'char'
   11 |   sort(y.begin(), y.end(), greater<char>());
      |                                    ^~~~
a.cc:14:22: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |   for(int i = 0; i < min(x.size(), y.size()); i++){
      |                      ^~~
      |                      std::min
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   if(f) cout << "Yes";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   else cout << "No";
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~