https://programmers.co.kr/tryouts/850/intro
You can see the problem if you go to the address here. It's this kind of problem.
This is a very difficult problem.
I'd like you to study something called dynamic programming.
If M(n) is the minimum number of characters required when constructed using the characters of strs from the nth to the last position of the string t, M(n) is the string containing the string from the nth to the nth + kth position, then M(n) is the smallest of 1 + M(n + k + 1) and (k is 0 to 4). If the minimum is infinite, let's just say there's no possible way.
© 2024 OneMinuteCode. All rights reserved.