会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Zookkk
博客园
首页
新随笔
联系
订阅
管理
2019年2月20日
CCPC-Wannafly Winter Camp Day1 (Div2, onsite)补题总结
摘要: A:unsolved B:DP 数据范围非常的小,我们可以首先想到用动态规划来思考这道题,我们发现每个位置的糖果的数量都可以从上下左右和自己5个状态转移过来,也就是 dp[i][j-1][k-1] -> dp[i][j][k] dp[i][j+1][k-1] ->dp[i][j][k] dp[i-1
阅读全文
posted @ 2019-02-20 23:07 Zookkk
阅读(299)
评论(0)
推荐(0)
2018年12月1日
Educational Codeforces Round 55 (Rated for Div. 2)A,B,C,D,E总结
摘要: A:这个鬼屎题,我真的没有发现x和y的大小关系是没有确定的,导致我疯狂wa,其实这道题也就是一道水题。代码:#includeusing namespace std;#define inf 0x3f3f3f3fconst long long maxn=1e5+9;int...
阅读全文
posted @ 2018-12-01 10:40 Zookkk
阅读(192)
评论(0)
推荐(0)
2018年11月29日
STL中erase()小心使用 (转)
摘要: http://blog.sina.com.cn/s/blog_67b6b720010114d3.htmlerase()函数的功能是用来删除容器中的元素删除某个容器里的某个元素:c.erase(T);看似一个简单的动作,然而对不同类型的容器,内部却做了截然不同的事情,后...
阅读全文
posted @ 2018-11-29 19:34 Zookkk
阅读(154)
评论(0)
推荐(0)
2018年11月28日
线段树区间修改
摘要: 再补个线段树区间修改的板子#includeusing namespace std;#define inf 0x3f3f3f3fconst int maxn=1e5+9;struct node{ int lazy,val,l,r;}T[maxn*4];void p...
阅读全文
posted @ 2018-11-28 20:35 Zookkk
阅读(155)
评论(0)
推荐(0)
2018年11月27日
线段树单点修改
摘要: 写了这么久的线段树了,一直没有把以前写的线段树记下来,搞得每次一碰到线段树就又要手敲一遍#includeusing namespace std;#define inf 0x3f3f3f3fconst int maxn=1e5+9;int T[maxn*4];void ...
阅读全文
posted @ 2018-11-27 21:47 Zookkk
阅读(391)
评论(0)
推荐(0)
2018年11月26日
Codeforces Round #523 (Div. 2)总结
摘要: A题:水题,如果k能整除n,则输出k/n,否则输出k/n+1.代码:#includeusing namespace std;#define inf 0x3f3f3f3fconst int maxn=1e5+9;int main(){ long long i,j,k,n...
阅读全文
posted @ 2018-11-26 21:44 Zookkk
阅读(187)
评论(0)
推荐(0)
2018年11月10日
简单求组合数(除法取模)
摘要: #includeusing namespace std;#define inf 0x3f3f3f3fconst int maxn=1e5+9;#define LL long longint e_gcd(int a,int b,int & x,int &y){ i...
阅读全文
posted @ 2018-11-10 20:27 Zookkk
阅读(312)
评论(0)
推荐(0)
扩展欧几里德求逆元+通用除法取模
摘要: #includeusing namespace std;#define inf 0x3f3f3f3fconst int maxn=1e5+9;int e_gcd(int a,int b,int &x,int &y){ if(!b){ x=1; y=0; retu...
阅读全文
posted @ 2018-11-10 16:50 Zookkk
阅读(552)
评论(1)
推荐(0)
2018年10月29日
带权并查集(种类并查集)的简单总结(顺带总结并查集)
摘要: 并查集是一种树型的数据结构,一般用于处理一些不相交集合(Disjoint Sets)的合并及查询问题,对于普通的并查集我们一般分为三个部分——初始化,查找,合并。初始化:把每个点所在集合初始化为其自身(即每个元素单独构成一个集合,其父结点是其本身)。查找:查找元素所在...
阅读全文
posted @ 2018-10-29 22:01 Zookkk
阅读(177)
评论(0)
推荐(0)
Codeforces Round #519 by Botan Investments(A,B,C,D,E)
摘要: A:水题。题目大意就是找到最小的k使得n*k-sum>sum代码:#includeusing namespace std;#define inf 0x3f3f3f3fconst int maxn=1e2+9;int a[maxn];int main(){ int i,...
阅读全文
posted @ 2018-10-29 20:29 Zookkk
阅读(128)
评论(0)
推荐(0)
下一页
公告