Untitled

 avatar
user_5668965
c_cpp
16 days ago
280 B
2
Indexable
Never
#include<bits/stdc++.h>
#define t long long 
using namespace std;
map<t,t>f;t n,p;string s; 
main(){
    cin>>n;while(n--){t a=0;cin>>s;
    for(t j=0;j<s.size();j++)a^=1<<s[j]-'a';
    for(t j=0;j<26;j++)p+=f[1<<j^a];p+=f[a]++;}cout<<p;  
}
 				  	 				  						   		  	
Leave a Comment