当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2882:The k-th String sequence

题目描述
Given a String s, we will first collect all distinct positive length subsequences of s, and place them in a list L. A subsequence of s is obtained by deleting 0 or more characters. Next, sort L into ascending order by length. Where ties occur, break them lexicographically. Here uppercase letters occur before lowercase letters. Finally, return the String in position k % TOTAL (0-based), where TOTAL is the number of elements in L.
输入解释
Line 1: The input contains a single integer T , the number of test cases.

Line 2...T+1: s k (The input string s and the position of the output string).

(The length of s is between 2 and 50. Each character in s will be a letter ('A'-'Z','a'-'z').
k will be an integral value between 0 and 2^63 - 1 inclusive. )e.
输出解释
Line 1...T: Output the string for each test case.
输入样例
3
ABCD 15
ABCD 14
AbcdAbcdAbcd 39283423984923
输出样例
A
ABCD
AbAbdbd
来自杭电HDUOJ的附加信息
Recommend gaojie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2882

最后修改于 2020-10-25T22:57:48+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)