Advertisement
Josif_tepe

Untitled

Jun 7th, 2024
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main()
  6. {   int resultat =0;
  7.  
  8.     int n;
  9.     cin>>n;
  10.     for (int i=n;i>0;i--){
  11.     string s;
  12.     cin>>s;
  13.     string s1;
  14.     cin>> s1;
  15.     sort(s.begin(),s.end());
  16.     sort(s1.begin(),s1.end());
  17.     if(s==s1){
  18.         resultat++;
  19.     }
  20.     }
  21.    cout<< resultat <<endl;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement