This problem asks you:
For example, if the input is
1 2 3 4 5 6 7 -1
1 1 4 -1
2
1 8
3 9
The first sequence is 1 2 3 4 5 6 7 -1, so a linked list is created as

The second sequence is 1 1 4 -1, so do the follows.
After p1=1, the list becomes

because the first node is 1.
After p2 = 1, the list becomes

because the first node is 2.
After p3 = 4, the list becomes

because the fourth node is 6.
The next number is 2, so you need to read two lines.
The first line is 1 8, so the data of new node is 8 and should be inserted at position 1. The list becomes

The second line is 3 9, so the data of new node is 9 and should be inserted at position 3. The list becomes

Finally, the answer is 8 3 9 4 5 7.
Note for those who are not familiar with partial judge:
You will be provided with main.c and function.h, and asked to implement function.c containing three function createList, deleteNode and insertNode.
For OJ submission:
Step 1. Submit only your function.c into the submission block. (Please choose c compiler)
Step 2. Check the results and debug your program if necessary.
The input contains 3 parts:
1. A sequence of positive integers as the linked list, except the last one, which is -1.
2. A sequence of positive integers as the position need to be deleted, except the last one, which is -1.
3. A number N means the number of inserted node, and next N lines contain a pair of number (X, Y). X is the position which you are asked to insert a new node into and Y is the data of the node.
The output contains the sequence of resulting linklist.