cswork / OAOpen practice workspace

WeworkOA #1

Meeting Room

Estimated HardStatement and editorial — judging is being prepared

Topics (AI-labelled)Scheduling DPBinary Search

Given N groups of people who want to have a meeting in the only meeting room in the office. Each group has people[i] people, who want to start the meeting at the starting[i] time and end it at the ending[i] time (both inclusive). No two groups can use the meeting room at the same time, If group j does not get the meeting room, then all the people[i] people cannot meet. Calculate the minimum number of people that cannot meet if the meeting room is optimally assigned to groups. Note: Group i and j can get the meeting room one after the other if and only if end[i] Input Format: • The first line contains Ndenoting the number of groups. • The second line containsNspace-separated integers denoting the number of people in each group • The third line containsNspace-separated integers denoting the starting time of each group's meeting • The fourth line containsN` space-separated integers denoting the ending time of each group's meeting

Constraints

N/A

Editorial

Loading solution…