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

13865번 - Cutting 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
0.2 초 256 MB646617.143%

문제

You have two strings and you need to check whether you can cut the second one into three pieces so that the first string can be concatenated from these three pieces.

입력

The input file contains two non-empty strings, each on a separate line. Each string consists of at most 5000 lowercase roman letters. Strings have the same length and each letter has the same number of occurrences in both strings.

출력

Print YES if it is possible to cut the string as described, and NO in the opposite case. If you print YES, the following three lines should contain the parts of the second string in the correct concatenation order. These parts cannot be empty. If you have several options to cut, print any of them.

제한

예제 입력 1

beast
betas

예제 출력 1

YES
be
as
t

예제 입력 2

royalitem
romeitaly

예제 출력 2

NO

힌트

출처

ICPC > Regionals > Europe > Southeastern European Regional Contest > SEERC 2016 K번

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

출처

대학교 대회

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

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