Hdoj 3697 Selecting courses 【贪心】】的更多相关文章

Selecting courses Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 62768/32768 K (Java/Others) Total Submission(s): 2082    Accepted Submission(s): 543 Problem Description     A new Semester is coming and students are troubling for selecting c…
题目链接:pid=3697" target="_blank">http://acm.hdu.edu.cn/showproblem.php?pid=3697 Problem Description     A new Semester is coming and students are troubling for selecting courses. Students select their course on the web course system. There…
Description     A new Semester is coming and students are troubling for selecting courses. Students select their course on the web course system. There are n courses, the ith course is available during the time interval (A i,B i). That means, if you…
Description     A new Semester is coming and students are troubling for selecting courses. Students select their course on the web course system. There are n courses, the ith course is available during the time interval (Ai,Bi). That means, if you wa…
Selecting courses Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 62768/32768 K (Java/Others) Total Submission(s): 1856    Accepted Submission(s): 469 Problem Description     A new Semester is coming and students are troubling for selecting c…
题意: 一个学生要选课,给出一系列课程的可选时间(按分钟计),在同一时刻只能选一门课程(精确的),每隔5分钟才能选一次课,也就是说,从你第一次开始选课起,每过5分钟,要么选课,要么不选,不能隔6分钟再选.在给出的课程的事件Ai~Bi内,Bi起的那分钟是不能够选的了,就是说截止到(Bi-1)分钟59秒还能选,Bi就不能选了. 思路: 由于n最大才300,那就可以使用暴力解法.开始时刻可以从0~4分钟这5个时刻开始,因为每5分钟是个周期,比如0分没选,而5分才选了,这和从5分才开始选是一样的.每隔5…
题目链接:https://vjudge.net/problem/HDU-3697 题目大意:选课,给出每门课可以的选课时间.自开始选课开始每过五分钟可以选一门课,开始 时间必须小于等于四,问最多可以选多少门课. 题目分析:贪心即可. 先按照结束时间进行排序,然后枚举不同开始选课时间可以选到的课程数目, 输出最大的即可. (感觉这题题意好迷,怕是个题意题喲) 给出代码: #include <cstdio> #include <iostream> #include <string…
Selecting Courses Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8316   Accepted: 3687 Description It is well known that it is not easy to select courses in the college, for there is usually conflict among the time of the courses. Li Mi…
poj——2239   Selecting Courses Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10656   Accepted: 4814 Description It is well known that it is not easy to select courses in the college, for there is usually conflict among the time of the c…
Selecting Courses Time Limit: 1000MS   Memory Limit: 65536K       Description It is well known that it is not easy to select courses in the college, for there is usually conflict among the time of the courses. Li Ming is a student who loves study eve…