Kattis - froshweek2 Frosh Week 类二分图匹配

Zac教授在新生周面临任务挑战,每个任务都有精确的完成时间。他只能在没有音乐干扰的安静时段内完成任务。给定任务时间和安静时段,目标是找出Zac能完成的最大任务数。输入包含任务数量、安静时段数量及各自时长,输出是能完成的任务数。题目提供样例输入和输出,并要求按特定格式输出结果。
摘要由CSDN通过智能技术生成

Professor Zac is trying to finish a collection of tasks during the first week at the start of the term. He knows precisely how long each task will take, down to the millisecond. Unfortunately, it is also Frosh Week. Zac’s office window has a clear view of the stage where loud music is played. He cannot focus on any task when music is blaring.

The event organizers are also very precise. They supply Zac with intervals of time when music will not be playing. These intervals are specified by their start and end times down to the millisecond.

Each task that Zac completes must be completed in one quiet interval. He cannot pause working on a task when music plays (he loses his train of thought). Interstingly, the lengths of the tasks and quiet intervals are such that it is impossible to finish more than one task per quiet interval!

Given a list of times ti (in milliseconds) that each task will take and a list of times ℓj (in milliseconds) specifying the lengths of t

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值