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

14534번 - String Permutation 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 512 MB81540328453.484%

문제

(String permutation) Write a recursive method to print all the permutations of a string. The user need to enter the string which consists of a set of characters.

입력

First line of the input contains T (1 ≤ T ≤ 200), the number of test cases. For each test case, there will a string of characters, L (1 ≤ L ≤ 5).

출력

For each test case, output a line in the format “Case # x:” where x is the case number (starting with 1), follow by the set of string permutation.

제한

예제 입력 1

3
abc
zxyw
p7*

예제 출력 1

Case # 1:
abc
acb
bac
bca
cab
cba
Case # 2:
zxyw
zxwy
zyxw
zywx
zwxy
zwyx
xzyw
xzwy
xyzw
xywz
xwzy
xwyz
yzxw
yzwx
yxzw
yxwz
ywzx
ywxz
wzxy
wzyx
wxzy
wxyz
wyzx
wyxz
Case # 3:
p7*
p*7
7p*
7*p
*p7
*7p

힌트

출처

ICPC > Regionals > Asia Pacific > Malaysia > Malaysia National Programming Contest > Al-Khawarizmi National Programming Contest 2016 B번

  • 잘못된 조건을 찾은 사람: jh05013
(追記) (追記ここまで)

출처

대학교 대회

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

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