DAPC25-066.Dralinpome
Medium · 1 s · 256 MB
- icpc
- dapc
- 2025
Your highly intelligent girlfriend, Jeannetta Ewell from Mississippi, loves to concatenate letters. For each of your anniversaries, you prepare a jar of letter jelly as a gift for Jeannetta. One of her favorite linguistic constrictions is that of a palindrome. In a palindrome, each letter reappears in place after a reorientation, reversing the string. For example, the word “racecar” is a palindrome, as it reads the same forwards and backwards.
After writing out “jeannetta” with her letter jelly, by arranging the letters in the order “natejetan”, she suddenly realized that she made a palindrome! This incidence lead to Jeannetta introducing her inventive definition of a dralinpome. In a dralinpome, the letters can be rearranged to form a palindrome.
Jeannetta now seeks to know all dralinpomes in the dictionary. However, due to her disinterestedness in programming, she would need to manually consider each word in the dictionary. While she has no idea what to do with an array or a queue, you and your teammates reparticipate in programming competitions each year. Therefore, you decide to help her and prepare a program that testifies of any given word whether it is a dralinpome or not.
Giriş formatı
The input consists of:
• One line with a string (), the word to check. The word consists of only English lowercase letters (a-z).
Çıxış formatı
Output “yes” if the given word is a dralinpome, or “no” otherwise.
Qeyd
Source: Delft Algorithm Programming Contest 2025 · Author: Mike de Vries · License: CC BY-SA 4.0 · Original: https://dapc.wisv.ch · Statement adapted for AlgoLens and shared under the same license.
Nümunələr
Giriş #1
zoo
Çıxış #1
yes
Giriş #2
yes
Çıxış #2
no
Giriş #3
cacao
Çıxış #3
yes
Giriş #4
multinomiaalcoefficient
Çıxış #4
yes
Giriş #5
racecars
Çıxış #5
no