HDU 6651 Final Exam】的更多相关文章

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…
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…
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 来源: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…
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$.(如果是出…
题意: 有n道题,这n道题共m分,要求你至少做出k道才能及格,你可以自由安排复习时间,但是只有某道题复习时间严格大于题目分配的分值时这道题才能够被做出来,求最少的,能够保证及格的复习时间.复习时间和分数都是整数. 题解: 为什么给这道题一个博弈的标签呢?因为这道题其实是这样一个博弈过程: 第一回合,玩家A给自己的n个题分配复习时间 第二回合,玩家B拿到m个分数,去给题目分配分数,卡A的复习成果,只要分数和复习时间完全一样就相当于卡掉了,至少卡掉n-k+1个题B就获胜 明白了吧,学生对于题目分数分…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6651 题意:n个科目,总共m分,通过一科需要复习花费科目分数+1分钟,在不知道科目分数的情况下,问最少需要复习多少分钟使得一定可以通过至少k科. 因为需要通过k科,所以最坏的情况是n-k+1科复习时间不够(即只通过k-1科),所以我们要让复习时间最少的n-k+1科其中任选一科都不拖后腿.我们将m分 平均分配到n-k+1科中,如果分配不均则让一些科多复习一分钟,同时在其余k-1科都要复习比n-k+1科…
思路: dp[i][j][k]:满足在字符串的j位,前一位数字是k. 代码如下: #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #define ll long long #define M 100000000 using namespace std; ],a[],b[]; ],dp[][][]; bool ok(i…
题目链接: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…