#include<stdio.h>
#include<string.h>
int main() {
int t,n,i,m,k,s,max;
char st[100];
scanf("%d",&t);
while(t--) {
s=0;
scanf("%s%d",st,&m);
n=strlen(st);
while(m<n) {
for(i=s,max=st[i];i<=m;i++) {
if(st[i]>max) {
max=st[i];
s=i;
}
}
s++;
m++;
printf("%c",max);
}
printf("\n");
}
return 0;
}
1034775 | hpu_yw | 寻找最大数 | ![]() | 4 | 232 | C/C++ | 11-01 09:59:02 |