For this Question: Given two strings S and T of the same length, you can rearrange the characters in S and T. Your task is to find if it is possible to rearrange S and T such that S is lexicographically smaller than T.The first line of input contains the string S. The next line of input contains the string T.

Constraints:-
1 <= |S| = |T| <= 100000

Note:- Both the string will contain only lowercase english letters.Print "YES" if it is possible to rearrange S and T such that S is lexicographically smaller than T else print "NO".Sample Input:-
school
newton

Sample Output:-
YES

Explanation:-
One of the possible rearrangements:- cshool < newton

Sample Input:-
efgh
abcd

Sample Output:-
NO, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  string s,t;
  cin>>s>>t;
  int a[26]={0},b[26]={0};
  for(int i=0;i<s.length();i++){
    a[s[i]-'a']++;
    b[t[i]-'a']++;
  }
  int x=0,y=0;
  for(int i=25;i>=0;i--){
    if(a[i]){
        x=i;
    }
    if(b[25-i]){
        y=25-i;
    }
  }

  if(x<y){cout<<"YES";}
  else{
    cout<<"NO";
  }
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?