Search for a command to run...
B of size M × 3, where each row represents a work type:B[i][0] → The day on which the work is assignedB[i][1] → The deadline day (the work must be completed before this day)B[i][2] → The number of days required to complete this workB[i][1]) for any work, no work can be done on this day.result[0] = 1d (1 ≤ d ≤ A):0 → Rest day M + 1 → Deadline day x (1 ≤ x ≤ M) → Work of type x is performed on day dExample 1
[5, [[1,4,2],[2,5,2]]][1, 1, 2, 0, 3, 0][5, [[1,4,2],[2,5,2]]]
[1, 1, 2, 0, 3, 0]