Petya's Exams CodeForces - 978G (贪心)

本文介绍了一个关于大学考试安排的问题,Petya需要在特定的n天里准备并参加m场考试。每场考试有发布题目、考试日期和所需准备天数。通过贪心策略,按考试结束时间的早晚来安排复习和考试,以确定Petya能否完成所有考试。如果可能,给出详细的日程安排;否则,输出-1。
摘要由CSDN通过智能技术生成
G. Petya's Exams
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Petya studies at university. The current academic year finishes with nn special days. Petya needs to pass mm exams in those special days. The special days in this problem are numbered from 11 to nn.

There are three values about each exam:

  • sisi — the day, when questions for the ii-th exam will be published,
  • didi — the day of the ii-th exam (si<disi<di),
  • cici — number of days Petya needs to prepare for the 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值