题目链接: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 (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…
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…
题目链接:https://vjudge.net/problem/HDU-3697 题目大意:选课,给出每门课可以的选课时间.自开始选课开始每过五分钟可以选一门课,开始 时间必须小于等于四,问最多可以选多少门课. 题目分析:贪心即可. 先按照结束时间进行排序,然后枚举不同开始选课时间可以选到的课程数目, 输出最大的即可. (感觉这题题意好迷,怕是个题意题喲) 给出代码: #include <cstdio> #include <iostream> #include <string…
Selecting Courses Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9380   Accepted: 4177 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…
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…
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…
hdu 4825 Xor Sum(trie+贪心) 刚刚补了前天的CF的D题再做这题感觉轻松了许多.简直一个模子啊...跑树上异或x最大值.贪心地让某位的值与x对应位的值不同即可. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define CLR(a,b) memset((a),(b),sizeof(…