
贪心
Annmike
ACM
展开
-
会场安排 最少用几个会场 贪心
有若干个活动,第i个开始时间和结束时间是[Si,fi),同一个教室安排的活动之间不能交叠,求要安排所有活动,最少需要几个教室? Input第一行一个正整数n (n <= 10000)代表活动的个数。第二行到第(n + 1)行包含n个开始时间和结束时间。开始时间严格小于结束时间,并且时间都是非负整数,小于1000000000Output一行包含一个整数表示最少教...原创 2017-12-08 14:51:39 · 1747 阅读 · 0 评论 -
Saruman's Army 贪心
Saruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman distributes seeing stones, known as palantirs, among the troops. Each pala...原创 2017-12-08 14:44:18 · 565 阅读 · 0 评论 -
Before an Exam
Tomorrow Peter has a Biology exam. He does not like this subject much, but d days ago he learnt that he would have to take this exam. Peter's strict parents made him prepare for the exam immediately, ...原创 2018-01-17 20:33:04 · 434 阅读 · 0 评论