Robin found an interesting poneglyph, instead of being a readable text, it is encoded with a specific pattern.
To decode the text, Robin told Zoro to slice the string to split it into readable text with his sword.
If Zoro knew python, he could easily use str.split() function. But he's got no programming skills.
For those who are not familiar with how the split function works:
Take example, string = Ixyzamxyzluffy
string.split('xyz') will result into string == ['I', 'am', 'luffy']
Note: This is a partial judge problem, please implement the function.h and don't forget to compile with C compiler.
oh, and be careful of the memory usage allocated dynamically to avoid MLE.
String S that should be splitted, 20 < S < 499
Pattern string P, 1 < P < 9
Output the strings splited by the given pattern.
Don't forget to include '\n' at the end of each output string.