Language: C++

#include <string>

#include <iostream>
using namespace std;

int main(){
    string t;
    string s;
    cin>>s;
    cin>>t;
    vector<int> tt=vector<int>(t.length());
    vector<int> ss=vector<int>(t.length());
    
    for (int i=0; i<t.length(); i++) {
        int k=0;
        
        if (t[i]=='a')k=0;
        if (t[i]=='b')k=1;
        if (t[i]=='c')k=2;
        if (t[i]=='d')k=3;
        if (t[i]=='e')k=4;
        if (t[i]=='f')k=5;
        if (t[i]=='g')k=6;
        if (t[i]=='h')k=7;
        if (t[i]=='i')k=8;
        if (t[i]=='j')k=9;
        if (t[i]=='k')k=10;
        if (t[i]=='l')k=11;
        if (t[i]=='m')k=12;
        if (t[i]=='n')k=13;
        if (t[i]=='o')k=14;
        if (t[i]=='p')k=15;
        if (t[i]=='q')k=16;
        if (t[i]=='r')k=17;
        if (t[i]=='s')k=18;
        if (t[i]=='t')k=19;
        if (t[i]=='u')k=20;
        if (t[i]=='v')k=21;
        if (t[i]=='w')k=22;
        if (t[i]=='x')k=23;
        if (t[i]=='y')k=24;
        if (t[i]=='z')k=25;
        
        tt[i]=k;
    }
    for (int i=0; i<s.length(); i++) {
        int k=0;
        
        if (t[i]=='a')k=0;
        if (t[i]=='b')k=1;
        if (t[i]=='c')k=2;
        if (t[i]=='d')k=3;
        if (t[i]=='e')k=4;
        if (t[i]=='f')k=5;
        if (t[i]=='g')k=6;
        if (t[i]=='h')k=7;
        if (t[i]=='i')k=8;
        if (t[i]=='j')k=9;
        if (t[i]=='k')k=10;
        if (t[i]=='l')k=11;
        if (t[i]=='m')k=12;
        if (t[i]=='n')k=13;
        if (t[i]=='o')k=14;
        if (t[i]=='p')k=15;
        if (t[i]=='q')k=16;
        if (t[i]=='r')k=17;
        if (t[i]=='s')k=18;
        if (t[i]=='t')k=19;
        if (t[i]=='u')k=20;
        if (t[i]=='v')k=21;
        if (t[i]=='w')k=22;
        if (t[i]=='x')k=23;
        if (t[i]=='y')k=24;
        if (t[i]=='z')k=25;
        
        ss[i]=k;
    }
    
    int ln;

    if (s.length()<t.length()) {
        ln=t.length();
    }
    else{
        ln=s.length();
    }
    
    for (int m=0; m<t.length(); m++) {
        for (int i=0; i<t.length()-1; i++) {
            if (tt[i]>tt[i+1]) {
                tt[i]=tt[i+1];
                tt[i+1]=tt[i];
            }
        }
    }
    
    for (int m=0; m<s.length(); m++) {
        for (int i=0; i<s.length()-1; i++) {
            if (ss[i]>ss[i+1]) {
                ss[i]=ss[i+1];
                ss[i+1]=ss[i];
            }
        }
    }
    
    for (int i=0; i<ln; i++) {
        if (ss[i]<tt[i]) {
            cout<<"Yes";
            i=ln;
        }
        else if (ss[i]==tt[i]){
        }
        else{
            cout<<"No";
            i=ln;
        }
    }
   
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'vector' was not declared in this scope
   11 |     vector<int> tt=vector<int>(t.length());
      |     ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <iostream>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:11:12: error: expected primary-expression before 'int'
   11 |     vector<int> tt=vector<int>(t.length());
      |            ^~~
a.cc:12:12: error: expected primary-expression before 'int'
   12 |     vector<int> ss=vector<int>(t.length());
      |            ^~~
a.cc:44:9: error: 'tt' was not declared in this scope; did you mean 't'?
   44 |         tt[i]=k;
      |         ^~
      |         t
a.cc:76:9: error: 'ss' was not declared in this scope; did you mean 's'?
   76 |         ss[i]=k;
      |         ^~
      |         s
a.cc:90:17: error: 'tt' was not declared in this scope; did you mean 't'?
   90 |             if (tt[i]>tt[i+1]) {
      |                 ^~
      |                 t
a.cc:99:17: error: 'ss' was not declared in this scope; did you mean 's'?
   99 |             if (ss[i]>ss[i+1]) {
      |                 ^~
      |                 s
a.cc:107:13: error: 'ss' was not declared in this scope; did you mean 's'?
  107 |         if (ss[i]<tt[i]) {
      |             ^~
      |             s
a.cc:107:19: error: 'tt' was not declared in this scope; did you mean 't'?
  107 |         if (ss[i]<tt[i]) {
      |                   ^~
      |                   t