[CF] Final Exam Arrangement】的更多相关文章

问题链接:http://www.bnuoj.com/v3/contest_show.php?cid=4329#problem/F   问题大意:         就是有1--N们课程,每一个课程都有一个考试区间[s,t),左闭右开,没有时间重叠的课程不能安排在一起,让尽量多的课程安排在一起,最少能安排多少天,并输出先后的课程: 题目分析:        贪心算法的综合运用,关键看怎么贪心,求重叠部分最多的,这个题不同于一般的贪心.我的做法是首先定义一个结构体里面包括课程序号.开始区间S.结束区间…
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3721 来源:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=26644#problem/F Final Exam Arrangement Time Limit: 4 Seconds      Memory Limit: 65536 KB      Special Judge In Zhejiang Univ…
In Zhejiang University, there are N different courses labeled from 1 to N. Each course has its own time slot during the week. We can represent the time slot of a course by an left-closed right-open interval [s, t). Now we are going to arrange the fin…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3721 容易的贪心题,排个序.. //STATUS:C++_AC_840MS_6272KB #include <functional> #include <algorithm> #include <iostream> //#include <ext/rope> #include <fstream> #include…
2019 杭电多校 7 1006 题目链接:HDU 6651 比赛链接:2019 Multi-University Training Contest 7 Problem Description Final Exam is coming! Cuber QQ has now one night to prepare for tomorrow's exam. The exam will be a exam of problems sharing altogether \(m\) points. Cub…
Kejin Player 期望DP 题意: 初始等级为1,每一级有四个参数 r , s , x , a . 每一级有一个概率p=r/s花费a的代价升级到下一级,失败可能会倒退到x级 设从 l 到 r 的期望为 g(l, r), 这种期望满足减法 g(l, r) = g(1, r) − g(1, l). 因为升级只能一级一 级升, 所以要从 1 升级到 r, 必然要经过 l. 求一个前缀和 sum[i+1]=sum[i]+ai * si / ri + (sum[i]-sum[x])*(si-ri)…
一.题目 Final Exam 二.分析 题目说的比较绕,总之一定要记住,$n$个题目都可以做,至少作对$k$到,但是做题目的人不知道每道题对应的分数. 作为出题人,如果他是田忌,肯定不会去在做题目的人可能会做对的$k-1$道题目上去放分,这样的话出题目的人可以使剩下的$n-k+1$道题的分尽可能大,从而防止学生做出$k$道题. 那么作为出题人,能摆出的最优情况就是$\frac{m}{n-k+1}$或者大于$\frac{m}{n-k+1}$的$n-k+1$个题目分,总和肯定还是$m$.(如果是出…
秋季学期的java已经结课了,当看到教务平台贴出的通知说考试形式为单选题时,心中喜忧参半. 可喜的是这种考试形式还是比较得民心,毕竟除了判断题,最好做的也就是单选题了. 然而期中考试选择题50%的命中率还历历在目,不免心生忧虑.然后后来的事实证明,果然我的忧虑不是毫无道理的,再次被虐,而且被虐的毫无怨言. 考试完后把还有印象的几道题目在eclipse上跑了跑,结果也是不堪回首.... 然后我决定把它们记下来,以期在不远的将来能够一雪前耻. #1.对,你没有看错,就是这道题,我当时靠着卓越的逆向思…
hdu题面 Time limit 2000 ms Memory limit 524288 kB OS Windows 吐槽 比赛时候晕死了-- 解题思路 先留坑 公式法 https://blog.csdn.net/qq_43316231/article/details/99320860 https://blog.csdn.net/weixin_44327262/article/details/99326110 https://blog.csdn.net/toohandsomeieaseid/ar…
1.algorithm analysis O B/W/AV/AMOR,混入其他问题,设计+分析 2.传统算法(肯定要考) 1)divide and conquer master therem. recursive tree.分析复杂度.递归树加起来得到最终结果 2)greedy algorithm example sort->select 拟阵 独立系统的贪心模板,直接得到近似比 3)dynamic programming sub-optimal structrue.编辑距离 3.graph a…