def METHOD_NAME(tasks):
    task_duration_to_indices = {}
    for idx in range(len(tasks)):
        task_duration = tasks[idx]
        if task_duration not in task_duration_to_indices:
            task_duration_to_indices[task_duration] = []
        task_duration_to_indices[task_duration].append(idx)
    return task_duration_to_indices