会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
starve_to_death
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
20
21
22
23
24
25
26
27
28
···
35
下一页
2019年11月2日
记忆化dp博弈
摘要: 题:http://poj.org/problem?id=2068 题意: 有两个队伍A,B,每个队伍有N个人,交叉坐。即是A(1,3,5,7.....)B(2,4,6,8....)。告诉你每个mi(1<=i<=2n)。 现在有一堆个数为S的石堆,从第1个人开始拿石头,因为是交叉坐所以也就相当于两队轮
阅读全文
posted @ 2019-11-02 16:11 starve_to_death
阅读(130)
评论(0)
推荐(0)
2019年11月1日
SG函数学习
摘要: 尼姆博弈就是sg函数的简单体现 学习粗:https://blog.csdn.net/luomingjun12315/article/details/45555495 //f[N]:可改变当前状态的方式,N为方式的种类,f[N]要在getSG之前先预处理 //SG[]:0~n的SG函数值 //S[]:
阅读全文
posted @ 2019-11-01 17:45 starve_to_death
阅读(168)
评论(0)
推荐(0)
2019年10月31日
尼姆博弈
摘要: 学习:https://blog.csdn.net/BBHHTT/article/details/80199541 题:http://acm.hdu.edu.cn/showproblem.php?pid=1850 #include<iostream> #include<cstdio> using na
阅读全文
posted @ 2019-10-31 13:45 starve_to_death
阅读(138)
评论(0)
推荐(0)
2019年10月27日
2-sat
摘要: 模板 void addedge(int u,int v){ g[u].pb(v); rg[v].pb(u); } void dfs(int u){ vis[u]=1; for(int i=0;i<g[u].size();i++) if(!vis[g[u][i]]) dfs(g[u][i]); cb.
阅读全文
posted @ 2019-10-27 15:48 starve_to_death
阅读(129)
评论(0)
推荐(0)
2019年10月25日
E. Alice and the Unfair Game(推导线段树)
摘要: 题:https://codeforces.com/contest/1236/problem/E 粗自:https://www.cnblogs.com/YSFAC/p/11715522.html #include<bits/stdc++.h> using namespace std; #define
阅读全文
posted @ 2019-10-25 11:18 starve_to_death
阅读(181)
评论(0)
推荐(0)
D. Salary Changing(找中位数)
摘要: 题:https://codeforces.com/contest/1251/problem/D 题意:给你n个单位需要满足达到的区间,再给个s,s是要分配给n的单位的量,当然∑l<=s,问经过分配后能够达到的最大中位数是多少 题解:二分找中位数,成立原因:代码注释 #include<bits/std
阅读全文
posted @ 2019-10-25 08:04 starve_to_death
阅读(646)
评论(0)
推荐(0)
2019年10月23日
F. Maximum Weight Subset(贪心or树形dp解法)
摘要: 题:https://codeforces.com/contest/1249/problem/F 题意:给一颗树,边权为1,节点有点权,问取到一个点集,俩俩之间路径超过k,是点权和最大 思路:贪心地取点,先将点按照深度经行排序,每一次,取一个点权大于0的点,然后对于这个点bfs出去的路径小于k的点减去
阅读全文
posted @ 2019-10-23 20:10 starve_to_death
阅读(334)
评论(0)
推荐(0)
2019年10月21日
一般图的最大匹配(模板)
摘要: 题:http://uoj.ac/problem/79 没什么好说的,只是区别于二分图 算法:带花树算法 #include<bits/stdc++.h> using namespace std; #define fo(i,a,b) for(int i=a;i<=b;i++) #define fod(i
阅读全文
posted @ 2019-10-21 22:00 starve_to_death
阅读(208)
评论(0)
推荐(0)
2019年10月16日
HDU 4300 Clairewd’s message(扩展KMP)
摘要: 这题的意思就是首先有一个字母的转换表,就是输入的第一行的字符串,就是'a'转成第一个字母,'b'转成转换表的第二个字母······· 然后下面一个字符串是密文+明文的形式的字符串。 就是说前后两段是重复的,只不过通过转换表转换了下。 而且后面一段可能不完整。 这道题问的就是将1个串如何变为strin
阅读全文
posted @ 2019-10-16 23:22 starve_to_death
阅读(130)
评论(0)
推荐(0)
2019年10月14日
Seikimatsu Occult Tonneru(网络流,状态数(建不建边)不多时,可考虑直接进行枚举
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4309 总结:边可存东西时,可新建一个点x连接u、v,x再连向汇点; #include<iostream> #include<cstring> #include<cstdio> #include<algorithm
阅读全文
posted @ 2019-10-14 19:48 starve_to_death
阅读(146)
评论(0)
推荐(0)
上一页
1
···
20
21
22
23
24
25
26
27
28
···
35
下一页
公告