上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 35 下一页
摘要: 题: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 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 尼姆博弈就是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 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 学习: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 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 模板 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 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题: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 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题: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 阅读(634) 评论(0) 推荐(0) 编辑
摘要: 题:https://codeforces.com/contest/1249/problem/F 题意:给一颗树,边权为1,节点有点权,问取到一个点集,俩俩之间路径超过k,是点权和最大 思路:贪心地取点,先将点按照深度经行排序,每一次,取一个点权大于0的点,然后对于这个点bfs出去的路径小于k的点减去 阅读全文
posted @ 2019-10-23 20:10 starve_to_death 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 题: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 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 这题的意思就是首先有一个字母的转换表,就是输入的第一行的字符串,就是'a'转成第一个字母,'b'转成转换表的第二个字母······· 然后下面一个字符串是密文+明文的形式的字符串。 就是说前后两段是重复的,只不过通过转换表转换了下。 而且后面一段可能不完整。 这道题问的就是将1个串如何变为strin 阅读全文
posted @ 2019-10-16 23:22 starve_to_death 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 35 下一页