Logo
(追記) (追記ここまで)

35021번 - Defense Distance 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB444100.000%

문제

The NWRRC security server has a final access check for teams that try to submit their solutions to the secret hidden problem.

To pass the check, the team must enter three passwords $s,ドル $t,ドル and $u$ that the system will accept. Each password must be a non-empty string consisting of at most 5000ドル$ lowercase English letters.

The rules of the server are public:

  • The distance between $s$ and $t$ should be equal to $a$.
  • The distance between $s$ and $u$ should be equal to $b$.
  • The distance between $t$ and $u$ should be equal to $c$.

The distance between two strings $s_1$ and $s_2$ is the minimum number of single-character operations (insert one character, remove one character, or replace one character) needed to convert string $s_1$ into string $s_2$. This metric is also known as the Levenshtein distance.

The server gives access to the hidden problem if and only if all described conditions are satisfied. Your goal is to construct a triple of passwords to unlock the hidden problem or determine that it is impossible.

입력

The only line contains three integers $a,ドル $b,ドル and $c,ドル denoting the required distances between each pair of passwords (0ドル \le a, b, c \le 1000$).

출력

If there are no three passwords with the required properties, print "No" in the only line.

Otherwise, print "Yes" in the first line. Then print passwords $s,ドル $t,ドル and $u$ in the following three lines. Each password should consist of at least 1ドル$ and at most 5000ドル$ lowercase English letters.

If there are multiple triples of passwords that meet the requirements, print any of them.

제한

예제 입력 1

4 3 5

예제 출력 1

Yes
icpc
nwrrc
itmo

예제 입력 2

2 2 2

예제 출력 2

Yes
aa
bb
cc

예제 입력 3

0 0 1

예제 출력 3

No

노트

In the first test case:

  • The distance between "icpc" and "nwrrc" is 4ドル$: "icpc" $\to$ "irpc" $\to$ "irrc" $\to$ "nrrc" $\to$ "nwrrc".
  • The distance between "icpc" and "itmo" is 3ドル$: "icpc" $\to$ "itpc" $\to$ "itpo" $\to$ "itmo".
  • The distance between "nwrrc" and "itmo" is 5ドル$: "nwrrc" $\to$ "wrrc" $\to$ "wrro" $\to$ "irro" $\to$ "itro" $\to$ "itmo".

In the second test case, the distance between each pair of passwords is 2ドル$.

In the third test case, it can be shown that there are no three passwords with the required properties.

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > ICPC 2025-2026 Northwestern Russia Regional Contest D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /