02 2020 档案

摘要:题意:https://blog.csdn.net/Umbrella__/article/details/78382710 思路: 首先dp【i】【j】保存的是,i节点到其叶子节点最大距离是j的合法概率。 一开始,转移的时候我想:只保证两颗子树从根到叶子最大值相加合法是不是有错(因为一个子树内部可能还 阅读全文
posted @ 2020-02-23 16:09 ZMWLxh 阅读(260) 评论(0) 推荐(0) 编辑
摘要:题意:https://blog.csdn.net/jeremy1149/article/details/52967131 差不多了。 阅读全文
posted @ 2020-02-23 12:27 ZMWLxh 阅读(163) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=4216 有很多向量,你可以反转某些向量,让你尽可能远离0,0点。 思路: 首先贪心是不行的详见C:\Users\xx\Desktop\截图\hdu4216.png dp存放的是,x坐标下的最大值和最小值 1 阅读全文
posted @ 2020-02-22 19:37 ZMWLxh 阅读(250) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=3952 思路:https://www.cnblogs.com/ACMERY/p/4483405.html 判断直线切凸包就是判断一下存不存在端点在直线异侧就行了。 1 #include<cstdio> 2 # 阅读全文
posted @ 2020-02-21 12:13 ZMWLxh 阅读(290) 评论(0) 推荐(0) 编辑
摘要:题意:https://ac.nowcoder.com/acm/contest/4370 将一棵树切k-1刀分成k棵树,问这k棵树里最大的权值的最小值是多少 思路:https://www.cnblogs.com/ucprer/p/11931263.html 二分最大值。 dfs割子树,每次从下往上切一 阅读全文
posted @ 2020-02-20 21:23 ZMWLxh 阅读(278) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=3336 rt 思路:https://www.cnblogs.com/Tree-dream/p/7443897.html 差不多了,dp只是简化递归而已。 1 #define IOS ios_base::syn 阅读全文
posted @ 2020-02-19 14:37 ZMWLxh 阅读(367) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=4149 已知九个数:x1 xor m,x2 xor m......x8 xor m,(x1+x2+....+x8) xor m;求出m 思路:https://blog.csdn.net/AC_0_summer 阅读全文
posted @ 2020-02-18 19:56 ZMWLxh 阅读(222) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=6472 rt。 思路:https://www.cnblogs.com/graytido/p/12296710.html 差不多了 1 #define IOS ios_base::sync_with_stdio 阅读全文
posted @ 2020-02-16 21:38 ZMWLxh 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-02-15 20:03 ZMWLxh 阅读(254) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=5261 思路: 可以发现每个i都有一个取值半径,单调队列顺逆维护两遍就行了。 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #includ 阅读全文
posted @ 2020-02-15 11:43 ZMWLxh 阅读(239) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=6723 如题。 思路: http://acm.hdu.edu.cn/showproblem.php?pid=6723 差不多了。 1 #define IOS ios_base::sync_with_stdio 阅读全文
posted @ 2020-02-09 19:59 ZMWLxh 阅读(317) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=5208 两个人分别有l,r的区间可以取一个数,ans=A^B,A人想让答案尽量大,B反之。 问ans。 思路: 数位dp,https://blog.csdn.net/yhn19951008/article/d 阅读全文
posted @ 2020-02-08 21:13 ZMWLxh 阅读(233) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=5607 有向图中问你从定点u走到x的概率 思路: 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #include <cstdio>//sp 阅读全文
posted @ 2020-02-08 20:19 ZMWLxh 阅读(261) 评论(0) 推荐(0) 编辑
摘要:一根a长,一根b长的小木棒,只能断其中一根的一个地方,问能构造成三角形的种类数。 1 if(b>a&&a+b>=3) 2 { 3 LL t=(b-a+1)/2; 4 if((b-a)&1) 5 ans=b-2*t+1; 6 else 7 ans=b-2*t-1; 8 } 阅读全文
posted @ 2020-02-06 20:39 ZMWLxh 阅读(365) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=5069 给你n个串,m个询问:以b串的前缀和a串的后缀最长是多少。 思路:https://blog.csdn.net/gatevin/article/details/46123703 讲的很全面了。 1 #d 阅读全文
posted @ 2020-02-05 14:47 ZMWLxh 阅读(283) 评论(0) 推荐(0) 编辑
摘要:题意:http://acm.hdu.edu.cn/showproblem.php?pid=2841 找到x,y互质的坐标个数 思路: 和hdu4135很类似。 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #include <cs 阅读全文
posted @ 2020-02-04 11:07 ZMWLxh 阅读(214) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示