You have a word, and you can change the order of its letters however you like. Of all the possible results, which would be the third, in alphabetical order?
Input consists of several non-empty words , each with at most lowercase letters.
For every
,
among all the possible reorderings of its letters, print the third in
alphabetical order. If there is no such third word, print
“NO”.
Author: Salvador Roura
Event: Vint-i-quatrè Concurs de Programació de la UPC -
Semifinal
Date: 2026-06-18
Generation: 2026-06-10T18:09:21.411Z
© Jutge.org, 2006–2026.
https://jutge.org