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

27682번 - Adjusting passwords 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB76503759.677%

문제

Another IPSC has just started and you are late! You rush to your PC only to discover that you locked the screen and now you have to enter your password quickly to unlock it.

You are presented with a password prompt. It only supports the following keys:

Key Action
a to z enters the character.
enter submits the password.
backspace erases the last entered character, if any.

If you submit an invalid password, you will see an error message and a new, empty prompt will open.

Your password is P. In all the rush, you just typed the string Q into the prompt. It is possible that Q is not P: there may be a typo or two, or it can even be a completely different string.

Given P and Q, log in using as few additional keystrokes as possible.

입력

The first line of the input file contains an integer t specifying the number of test cases. (t ≤ 1000) Each test case is preceded by a blank line.

Each test case consists of two lines. The first line contains the correct password P and the second line contains the already typed string Q. Both are non-empty and have at most 50 characters.

출력

For each test case, output a line containing the list of keystrokes you want to press. Pressing enter is represented by * and pressing backspace is represented by <.

If there are multiple optimal solutions, you may output any of them.

제한

예제 입력 1

3
superfastawesome
superfastaxesome
superfastawesome
xuper
superfastawesome
superfastawe

예제 출력 1

<<<<<<wesome*
*superfastawesome*
some*

힌트

In the first test case, we keep pressing backspace until we delete the typo. In the second test case, it’s faster to press enter immediately, receive an error message and begin anew from an empty prompt.

출처

Contest > Internet Problem Solving Contest > IPSC 2014 A번

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

출처

대학교 대회

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

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