링크 : https://school.programmers.co.kr/learn/courses/30/lessons/42883
#include <string>
#include <vector>
using namespace std;
string solution(string number, int k) {
string answer = "";
int index = 0;
for(int i = 0; i < number.size() - k; i++){
char max = '0';
for(int j = index; j <= k+i; j ++){
if(number[j] > max){
max = number[j];
index = j;
}
}
index ++;
answer += max;
}
return answer;
}