| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 (추가 시간 없음) | 1024 MB | 22 | 5 | 4 | 19.048% |
The NIS spy network has decided to change the phone number from its headquarters every day as an extra security measure. To inform the spies about the new number, a sequence of words is given only to the spies (a total of 10 words), which they must then compare to a sequence of words from a newspaper, word by word. The comparison of words is done by finding the minimum number of operations required to make the first word identical to the second word. The possible operations that can be performed on the first word are the following:
The first line contains the number (N) of words in the newspaper paragraph that will be used. The second line contains the 10 positions from the words that must be used from the given paragraph. The third line contains the 10 initial words of the secret phrase. The fourth line provides the N words of the paragraph.
The phone numbers found separated by spaces.
15 1 3 2 5 6 8 15 10 11 12 hello I cannot wait to start coding for this problem amidst the tranquil forest a cascade of colors painted the trees in a mesmerizing dance
6 8 6 3 7 5 5 3 3 7
Short explanation: In the above example, the edit distance should be calculated between the words: hello ↔ amidst (6), I ↔ tranquil (8), cannot ↔ the (6), wait ↔ a (3), to ↔ cascade (7), start ↔ colors (5), coding ↔ dance (5), for ↔ the (3), this ↔ trees (3), problem ↔ in (7)