There are N students in the class, the teacher wants to play a game with them, the student who makes the longest sentence will win.
But there are rules for making sentences, in this game each operation is randomly drawn, the teacher will randomly select students who can make sentences, and randomly decide what they can do.
There are 5 types of operations:
The first line contains two integers N, M: the number of students and the number of operations.
The following M lines, each line contains one type of operation.
testcases:
(3/6) 0 < x, y <= N <= 100, 0 < M <= 100, 0 < |s| <= 100
(3/6) 0 < x, y <= N <= 100, 0 < M <= 10000, 0 < |s| <= 100
Note that: s is the string to be added during the add operation, the length of student's sentence may exceed 100.
Note: Please use malloc() and free() properly.
See the description