#C2824. Taco: Can Form Palindrome?
Taco: Can Form Palindrome?
Taco: Can Form Palindrome?
Given a string S, determine if its characters can be rearranged to form a palindrome. A palindrome is a string that reads the same backward as forward. The necessary and sufficient condition for a string to be rearranged into a palindrome is that at most one character has an odd frequency count.
For example, the string "civic" is already a palindrome, and the string "ivicc" can be rearranged into "civic".
Your task is to implement a solution that reads a string from standard input, checks if the string can be rearranged into a palindrome, and outputs True
if it can, and False
otherwise.
Note: If the input string is empty, consider it as a valid palindrome.
inputFormat
The input consists of a single line containing the string S. The string contains only alphanumeric characters. Input is read from standard input (stdin).
outputFormat
Output a single line containing True
if the string can be rearranged into a palindrome, and False
otherwise. The output should be written to standard output (stdout).
civic
True