| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 1024 MB | 91 | 32 | 26 | 34.211% |
If you spent any amount of time on social media at the end of last year, you are probably familiar with the word finding game Wordle, in which you need to find a five-letter English word using at most six guesses. After each guess, the letters in that guess are marked in either green, yellow or black to provide information about the hidden word:
Figure L.1: Illustration of Sample Input 1, where "upper" is the only valid last guess.
In this problem, we consider a variant of Wordle where you need to find a hidden word of length $\ell$ in at most $g$ guesses. Additionally, there is no requirement that the hidden word or any of the guesses are words of any language; any string consisting of lowercase English letters is fine.
In your current play of this variant, you have already used all but one of your guesses, and now you need to find the hidden word using your final guess. Find any word that could be the hidden word based on the information you have.
The input consists of:
a-z) and the string $t$ consists of uppercase letters 'G', 'Y', and 'B' indicating green, yellow, and black respectively.It is guaranteed that the input describes a valid state of a Wordle game before the last guess and that a valid solution exists, in the form of a length $\ell$ word consisting of lowercase English letters.
Output a valid last guess that gives you a chance of winning.
If there are multiple valid solutions, you may output any one of them.
4 5 reply YYGBB refer BBBGG puppy YYGBB
upper
2 12 aabbccddeeff GGGYGBYYYBBB
aabdcbegdhij
ICPC > Regionals > Europe > Northwestern European Regional Contest > NWERC 2022 L번