#include #include bool can_be_palindrome(const char* text) { #define letters 'z' - 'a' + 1 long count[letters] = {0}, odd_count = 0; while ( *text ) ++count[ *text++ - 'a' ]; for ( short index = 0; index < letters; ++index ) odd_count += count[index] % 2; return odd_count <= 1; } int main() { char arr[1001]; if ( scanf("%1000s", arr) == 1 ) printf("%s: %d\n", arr, can_be_palindrome(arr)); return 0; }