注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
Given a sequence S of N digits, find a subsequence of K digits such that the number formed by these K digits (in order) is the largest.
S = "1", K = 1, answer = "1" # Single digit S S = "19191", K = 3, answer = "991" S = "19191", K = 4, answer = "9191" |