计算字符串第n个字符是出现的哪个字符,用C语言计算,谢谢

Problem Description
Given a string S contains only A and B.

Calculate the Kth string T which doesn't appear in S.

Compare the string in order of length,if length is same,then sort in order of lexicographical order.

Input
First line contains a single integer cases(cases≤5) which denotes the number of test cases.

For each test case, the first line is string S(1≤|S|≤20000), the second line have T+1 numbers,the first number is T,next T number(s) is Kth. (1≤T≤10,1≤K≤109)

Output
For each case, output T lines.

Sample Input
2
A
1 1
AAABBA
1 1

Sample Output
B
ABA

查看全部
shunfurh
编程介的小学生
2018/12/21 21:30
  • Golang
  • r语言
  • erlang
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复