Advertisement
LEGEND2004

Junior B

Feb 9th, 2024
773
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int cnt[105];
  5.  
  6. signed main()
  7. {
  8.     ios_base::sync_with_stdio(0);
  9.     cin.tie(0);
  10.  
  11.  
  12.     int t , l , r;
  13.     string s;
  14.     cin >> t;
  15.     int ans = 0;
  16.     while(t--){
  17.         cin >> s;
  18.         for(int i = 0; i < 26; i++)
  19.             cnt[i] = 0;
  20.  
  21.         for(int i = 0; i < s.size(); i++)
  22.             cnt[s[i] - 'a']++;
  23.  
  24.         int x = 0;
  25.         for(int i = 0; i < 26; i++){
  26.             if(cnt[i] % 2 == 0)
  27.                 x++;
  28.         }
  29.         if(x == 26)
  30.             ans++;
  31.     }
  32.     cout << ans << '\n';
  33. }
  34.  
  35.  
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement