For this Question: You are given two strings S and T. Determine whether it is possible to make S and T equal by doing the following operation at most once:
Choose two adjacent characters in S and swap them.
Note that it is allowed to choose not to do the operation.The input line contains two strings in separate lines.

<b>Constraints</b>
Each of S and T is a string of length between 2 and 100 (inclusive) consisting of lowercase English letters.
S and T have the same length.If it is possible to make S and T equal by doing the operation in Problem Statement at most once, print Yes; otherwise, print No.<b>Sample Input 1</b>
abc
acb

<b>Sample Output 1 </b>
Yes

<b>Sample Input 2</b>
aabb
bbaa

<b>Sample Output 2 </b>
No

<b>Sample Input 3</b>
abcde
abcde

<b>Sample Output 3 </b>
Yes, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
int main(){
    string S,T; cin >> S >> T;
    string ans = "No";
    if(S == T) ans = "Yes";
    for(int i=0; i<S.size(); i++){
        if(S[i] != T[i]){
            if(0 < i){
                swap(S[i-1],S[i]);
                if(S == T) ans = "Yes";
                swap(S[i-1],S[i]);
            }
            if(i+1 < S.size()){
                swap(S[i],S[i+1]);
                if(S == T) ans = "Yes";
                swap(S[i],S[i+1]);
            }
            break;
        }
    }
    cout << ans << endl;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?