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

15087번 - DRM Messages 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB24220716484.974%

문제

DRM Encryption is a new kind of encryption. Given an encrypted string (which we’ll call a DRM message), the decryption process involves three steps: Divide, Rotate and Merge. This process is described in the following example with the DRM message “EWPGAJRB”:

  • Divide – First, divide the message in half to “EWPG” and “AJRB”.
  • Rotate – For each half, calculate its rotation value by summing up the values of each character (A = 0, B = 1, . . . Z = 25). The rotation value of “EWPG” is 4 +たす 22 +たす 15 +たす 6 = 47. Rotate each character in “EWPG” 47 positions forward (wrapping from Z to A when necessary) to obtain the new string “ZRKB”. Following the same process on “AJRB” results in “BKSC”.
  • Merge – The last step is to combine these new strings (“ZRKB” and “BKSC”) by rotating each character in the first string by the value of the corresponding character in the second string. For the first position, rotating ‘Z’ by ‘B’ means moving it forward 1 character, which wraps it around to ‘A’. Continuing this process for every character results in the final decrypted message, “ABCD”.

입력

The input contains a single DRM message to be decrypted. All characters in the string are uppercase letters and the string’s length is even and ≤ 15 000.

출력

Display the decrypted DRM message.

제한

예제 입력 1

EWPGAJRB

예제 출력 1

ABCD

예제 입력 2

UEQBJPJCBUDGBNKCAHXCVERXUCVK

예제 출력 2

ACMECNACONTEST

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2017 East Central Regional Contest C번

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

출처

대학교 대회

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

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