fork download
  1. #include<bits/stdc++.h>
  2. #define int long long
  3. using namespace std;
  4. signed main() {
  5. ios::sync_with_stdio(0);
  6. cin.tie(0); cout.tie(0);
  7. string s; cin >> s;
  8. map<char, int> mp;
  9. for(char c : s) mp[c] ++;
  10. int ans = 0;
  11. for(auto x : mp) if(x.second % 2) ans ++;
  12. cout << max(0LL, ans - 1);
  13. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Standard output is empty