← 返回 openai 的题目列表Data Labeling Task Scheduler Construction
类型:online_judge
You are given integers t (number of tasks), m (number of models), h (number of human labelers), and an integer k.
Construct and return a schedule schedule as a list of triples [(task, model, human), ...] where:
task is in [0, t-1]
model is in [0, m-1]
human is in [0, h-1]
The returned schedule must satisfy:
Minimum workload: each human appears in the schedule at least k times.
Even distribution for (task, model) at any stage: for every prefix of the schedule, if you count occurrences of each (task, model) pair within that prefix, then [ \max_count(task, model) - \min_count(task, model) \le 1 ]
Even distribution for (task, human) at any stage: for every prefix, counting occurrences of each (task, human) pair within that prefix, [ \max_count(task, human) - \min_count(task, human) \le 1 ]
No duplicate labeling: each human can label each task at most once (i.e., (task, human) cannot repeat).
Return any schedule that satisfies all constraints. If it is impossible, return an empty list or handle as specified by the interviewer.
Constraints
Not provided in the interview notes (can be clarified).
Example (format illustration only)
Input: t=2, m=2, h=2, k=1 Output: [(0,0,0), (1,1,1), (0,1,1), (1,0,0)]
Example
Input
2 2 2 1
Output
Any valid schedule (implementation-dependent)