c语言一维数组怎么快速排列
256
2022-08-30
Train Seats Reservation
Input Format
Output Format
For each set of ticket reservations appeared in the input, calculate the minimum number of seats required so that all reservations are satisfied without conflicts. Output a single star '*' to signify the end of outputs.
样例输入
2 1 10 8 20 50 20 3 2 30 5 20 80 20 40 90 40 0
样例输出
20 60 *
思路:
按左边的站排序,暴力枚举比较。
代码:
#include
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~