NutanixOA #2
Work Schedules (for MTS2)
简单可在线判题
考点(AI 标注)回溯枚举
Given the total weekly work hours, the daily limit, and a partially fixed seven-day schedule, list all valid schedules.
输入格式
The input is work_hours, day_hours, pattern, separated by spaces; pattern has length 7, digits are fixed hours, and ? marks a day still to be scheduled.
输出格式
Output a compact JSON array of strings, sorted in ascending lexicographic order.
样例 1
输入:
24 4 08??840
输出:
["0804840","0813840","0822840","0831840","0840840"]
样例说明
Enumerate 0..day_hours for each question mark by position, pruning by the remaining hours and capacity.