14136 - Zoro's slash   

Description

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.

 

Input

String that should be splitted, 20 < < 499

Pattern string P, 1 < < 9

Output

Output the strings splited by the given pattern.

Don't forget to include '\n' at the end of each output string.

Sample Input  Download

Sample Output  Download

Partial Judge Code

14136.c

Partial Judge Header

14136.h

Tags




Discuss