#C3103. Meeting Slot Scheduler
Meeting Slot Scheduler
Meeting Slot Scheduler
A software company wants to develop an automated scheduling system for team meetings. Each team member provides one or more available time intervals along with an associated priority for that interval. The goal is to select a one-hour time slot that maximizes the aggregate priority. Formally, for each discrete time slot \( [t, t+1) \), let \( P(t) \) be the sum of the priorities of all availabilities covering that time slot, and let \( C(t) \) be the number of team members available at that time slot. A time slot \( [t, t+1) \) is considered suitable if \( C(t) \geq \lceil n/2 \rceil \), where \( n \) is the total number of team members. The objective is to choose the slot with the highest \( P(t) \). In case of ties, the earliest time slot (with the smallest \( t \)) is selected.
If no time slot satisfies the condition, output "No suitable time slot found!".
inputFormat
The first line contains two integers \( n \) and \( m \) where \( n \) is the number of team members and \( m \) is the number of availability intervals.
Each of the following \( m \) lines contains three integers \( s \), \( e \), and \( p \), representing the start time, end time (exclusive), and the priority of that interval, respectively.
outputFormat
Output a single line. If a suitable time slot is found, print the start and end time separated by a space in the format "s e". Otherwise, print "No suitable time slot found!".
## sample4 4
9 11 7
10 12 5
11 13 3
9 13 4
10 11