Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- { int resultat =0;
- int n;
- cin>>n;
- for (int i=n;i>0;i--){
- string s;
- cin>>s;
- string s1;
- cin>> s1;
- sort(s.begin(),s.end());
- sort(s1.begin(),s1.end());
- if(s==s1){
- resultat++;
- }
- }
- cout<< resultat <<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement