Solution to the problem number 260 of AceptaelReto - 260.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int cases; cin>>cases; cin.ignore();
    while(cases--)
    {
        string aux,aux1,reaux,reaux1;
        getline(cin,aux); getline(cin,aux1);
        for(unsigned int i=0; i<aux.length();i++) if(aux[i]==' ') continue; else reaux+=tolower(aux[i]);
        for(unsigned int i=0; i<aux1.length();i++) if(aux1[i]==' ') continue; else reaux1+=tolower(aux1[i]);
        sort(reaux.begin(),reaux.end());
        sort(reaux1.begin(),reaux1.end());
        if(reaux==reaux1) cout<<"SI\n";
        else cout<<"NO\n";
    }
return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!