上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 35 下一页
摘要: 引用:https://blog.csdn.net/auto_ac/article/details/9907881 很多概率题总逃不开用dp转移。 期望题总是倒着推过来的,概率是正着推的,多做题就会理解其中的原因 有些期望题要用到有关 概率 或 期望的常见公式或思想 遇到dp转移方程(组)中有环的,多 阅读全文
posted @ 2019-12-08 15:23 starve_to_death 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 题:https://ac.nowcoder.com/acm/contest/888/C #include<bits/stdc++.h> using namespace std; const int M=2e3+3; int n,A[M][M]; void dfs(int x){ if(x==1){ 阅读全文
posted @ 2019-12-08 10:32 starve_to_death 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1099/problem/F 题意:给定一个树,每个节点有俩个信息x和t,分别表示这个节点上的饼干个数和先手吃掉这个节点上一个饼干的的时间。然后有先手和后手俩个人。 ◉先手可以这么操作:在规定总时间T到达某个节点然后一定要返回根节点1 阅读全文
posted @ 2019-12-07 23:03 starve_to_death 阅读(129) 评论(0) 推荐(1) 编辑
摘要: 题:https://codeforces.com/contest/1262/problem/E 分析:预处理出阵列中的矩阵,然后二分答案还原题目的烧火过程,判断是否满足要求 #include<bits/stdc++.h> using namespace std; #define pb push_ba 阅读全文
posted @ 2019-12-04 16:47 starve_to_death 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1061/problem/C 题意:给你一个序列,我们求他们子序列的个数,这个子序列有个限制就是每一个子序列上的值都必须是能整除他的下标,问有多少个 分析:考虑dp,我们先考虑二维的dp,定义dp[i][j]表示前i个数中,能从中提取 阅读全文
posted @ 2019-12-04 14:58 starve_to_death 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 模版题: http://acm.hdu.edu.cn/showproblem.php?pid=1392(Graham算法) #include<bits/stdc++.h> using namespace std; const int M=1e3+3; struct tu{ double x,y; t 阅读全文
posted @ 2019-12-01 13:48 starve_to_death 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 题源:https://codeforces.com/gym/101635/attachments 题意: n行,每行给定字符串s1,s2,s3代表一些菜谱名。s2和s3是煮成是的必要条件,然后给出c和v,分别代表s1的消耗和收获; (注意:这个消耗并不可能是s1的真正消耗和收获,s1的最后消耗和收获 阅读全文
posted @ 2019-11-30 22:17 starve_to_death 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1082/problem/G 题意:给定有边权和点权的图,问你选一些边,然sum边-sum点最大(点权被多次用为公共点只会减一次) 分析:求最大闭合子图 选了点就要减去该点点权,选了边就加边权,然而俩点确定一边,我们可以理解为要做成一 阅读全文
posted @ 2019-11-24 13:47 starve_to_death 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1082/problem/E 题意:给出n个数和一个数c,只能操作一次将[L,R]之间的数+任意数,问最后该序列中能存在最多多少个c 分析:考虑dp,dp[i]表示将该位置染成c的答案,那么将该颜色染成c肯定要和其他和这个位置值相同的 阅读全文
posted @ 2019-11-23 14:28 starve_to_death 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1253/problem/E 题意:给定n个信号源,俩个参数x和s,x代表这个信号源的位置,s代表这个信号源的波及长度,即这个信号源可以遍及[x-s,x+s]范围,然后你可以消耗一个代价来换取某个信号源的s加1, 给定m,问信号覆盖1 阅读全文
posted @ 2019-11-17 14:30 starve_to_death 阅读(235) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 35 下一页