You are viewing a single comment's thread. Return to all comments →
bit shifting is fun :)
int main() { string s; cin>>s; int flag = 0; uint64_t mask = 0x0; for (int i = 0; i < s.length(); i++) mask = mask ^ (1 << (s[i]-'a')); if ((!mask) || (((mask & (mask - 1)) == 0))) flag = 1; if(flag==0) cout<<"NO"; else cout<<"YES"; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Game of Thrones - I
You are viewing a single comment's thread. Return to all comments →
bit shifting is fun :)