BZOJ3795 : 魏总刷DP】的更多相关文章

对于HARD: 需要满足$k+u[i]\times k\leq T+late[i]$. 对于EASY: 需要满足$k+u[i]\times k\leq T-rest[i]$. 故对于HARD,设$a[i]=-late[i]$,对于EASY,设$a[i]=rest[i]$,并将所有题目的$u[i]$都$+1$. 那么需要满足$\max(u[i]\times k+a[i])\leq T$. 求出这些直线形成的下凸壳,分段积分即可. 时间复杂度$O(n\log n)$. #include<cstdio…
Description 魏总,也就是DP魏又开始刷DP了.一共有n道题,第i道题魏总原本需要u[i]秒的时间.不过,为了表达对这些水题的藐视,魏总决定先睡k秒再开始刷题.魏总并不清楚自己会睡多久,只知道k是不超过m的正实数.并且魏总还忘了这节课有多长,只记得这节课的长度T(单位:秒)是在L到R之间.(魏总是从开始上课的时候开始睡的)睡醒后,魏总神奇地发现自己做每道题所需的时间变成了原来的k倍.不过DP魏就是DP魏,他可以同时做这n道DP,互不影响. 魏总本想虐场,但他很快发现自己低估这些题了.于…
最少拦截系统 Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1257 Appoint description:  System Crawler  (2015-09-07) Description 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都…
FatMouse's Speed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1160 Appoint description:  prayerhgq  (2015-07-28) System Crawler  (2015-09-05) Description FatMouse believes that the fatter a m…
Tickets Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1260 Appoint description:  System Crawler  (2015-09-06) Description Jesus, what a great movie! Thousands of people are rushing to the cine…
免费馅饼 Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1176 Appoint description:  prayerhgq  (2015-07-28) System Crawler  (2015-09-05) Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼.说来ga…
Super Jumping! Jumping! Jumping! Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1087 Appoint description:  System Crawler  (2015-09-05) Description Nowadays, a kind of chess game called “Super…
Piggy-Bank Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1114 Appoint description:  System Crawler  (2015-09-06) Description Before ACM can do anything, a budget must be prepared and the neces…
Monkey and Banana Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1069 Appoint description:  prayerhgq  (2015-08-04) System Crawler  (2015-09-05) Description A group of researchers are designing…
Max Sum Plus Plus Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1024 Appoint description:  System Crawler  (2015-09-05) Description Now I think you have got an AC in Ignatius.L's "Max Sum&…