#P13972. [VKOSHP 2024] Prank
[VKOSHP 2024] Prank
题目描述
Katya formed the word from blocks, but when she returned to the room, she saw her brother Andrey running out. Now the word made from the blocks looked different --- . Andrey admitted that he played a little . His prank consisted of the following: Andrey would choose a position and then insert two blocks with the same letter next to it. He could place these two blocks at the beginning of the string, at the end of the string, or between two neighboring blocks.
Help Katya determine whether Andrey told the truth, that is, whether the string could have been obtained from the string by possibly applying several .
输入格式
One test contains several sets of input data.
The first line contains one integer --- the number of sets of input data ().
In the first line of each set description, there is one string --- the word from the blocks that Katya originally had.
In the second line of each set description, there is one string --- the word from the blocks that Andrey obtained.
It is guaranteed that all words consist of lowercase Latin letters. The total length of all words does not exceed .
输出格式
For each set of input data, output , if Andrey could be telling the truth, and otherwise.
2
hello
havvaeeello
test
tesssst
YES
NO