删数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

给定正整数 N,KN,K 和一个 NN 位数,求在 NN 位数中删除 KK 位后剩下的数的最大值。

Input Format

第一行,两个整数 N,KN,K

第二行,一个 NN 位整数。保证没有前导 00

Output Format

输出剩下的数的最大值。

4 2
1924
94
7 3
1231234
3234
10 4
4177252841
775841

Hint

【数据规模与约定】

  • 对于 50%50\% 的数据,N1000N \le 1000
  • 对于 100%100\% 的数据,1K<N5×1051 \le K \lt N \le 5 \times 10^5

寒假集训_01_15

Not Attended
Status
Done
Rule
XCPC
Problem
21
Start at
2025-1-15 14:00
End at
2025-1-15 17:00
Duration
3 hour(s)
Host
Partic.
38