Problem: Vitaly enrolled in the course Advanced Useless Algorithms. The course consists of tasks. Vitaly calculated that he has hours to do the task from the day he enrolled in the course. That is, the deadline before the -th task is hours. The array is sorted in ascending order, in other words, the job numbers correspond to the order in which the assignments are turned in.
Vitaly does everything conscientiously, so he wants to complete each task by percent, or more. Initially, his completion rate for each task is percent.
Vitaly has training options, each option can be used not more than once. The th option is characterized by three integers: and . If Vitaly uses the th option, then after hours (from the current moment) he will increase the progress of the task by percent.
For example, let Vitaly have of tasks to complete. Let the array have the form: . Suppose Vitaly has of options: , , , , .
Then, if Vitaly prepares in the following way, he will be able to complete everything in time:
- Vitaly chooses the -th option. Then in hour, he will complete the -st task at percent. He still has hours left before the deadline for the -st task.
- Vitaly chooses the -rd option. Then in hours, he will complete the -nd task in its entirety. He has another hour left before the deadline for the -st task and hours left before the deadline for the -rd task.
- Vitaly chooses the -st option. Then after hour, he will complete the -st task for percent, which means that he will complete the -st task just in time for the deadline.
- Vitaly chooses the -th option. He will complete the -rd task for hours, and after another hour, Vitaly will complete the -rd task in its entirety.
Thus, Vitaly has managed to complete the course completely and on time, using the options.
Help Vitaly — print the options for Vitaly to complete the tasks in the correct order. Please note: each option can be used not more than once. If there are several possible answers, it is allowed to output any of them.
Input Format: The first line of input data contains an integer () —the number of input test cases in the test.
The descriptions of the input test case follow.
The first line of each test case description contains two integers and () —the number of jobs and the number of training options, respectively.
The next line contains numbers () — the time before the deadline of job . The array values — are non-decreasing, that is .
The following lines contain triples of numbers (, , ) — if Vitaly chooses this option, then after hours he will increase the progress of the task by percent. The options are numbered from to in order in the input data.
It is guaranteed that the sum of on all test cases does not exceed .
Output Format: For each test case, print on the first line the number , meaning that for of options, Vitaly will be able to complete each task by percent or more on time. The options should not be repeated. Or print -1 if Vitaly is unable to complete all tasks in time.
If there is an answer, on the next line print of different integers from to — the numbers of the options in the order you want. If there is more than one answer, it is allowed to print any of them.