自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 Counting Cliques HDU - 5952 (暴力+剪枝)

A clique is a complete graph, in which there is an edge between every pair of the vertices. Given a graph with N vertices and M edges, your task is to count the number of cliques with a specific size

2017-09-29 16:37:38 313

原创 F. Cities Excursions(倍增)

F. Cities Excursionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities in Berland. Some pairs of the

2017-09-28 13:40:30 416

原创 倍增感受,以及lca倍增模板

感觉倍增就是用来加速状态转移的,如果某一种状态转移具有相同的变化状态,并且满足结合律,那么可以用倍增来加速状态转移。一个经典的应用就是lca,或者说是求某条路径的第k个点。。对于lca来说很明显他的每次往上走去寻找祖先,每一次的状态的变化规则是相同的,所以我们可以用倍增来优化,把每个点的第2^0..2^1..2^2距离的点处理出来,然后每一次查询lca的两个点,我们先把高度统一到相同高

2017-09-28 13:20:15 292

原创 Layout (线性差分)

Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows are standin

2017-09-25 14:00:11 594

原创 差分约束

参考博客:点击打开链接差分约束:给你n个点,然后给出每个店的关系,比如对于下x1-x2>=d1,x3-x4这种题我们称为差分约束,我们根据答案所求的求建图如果求最大值,那么我们把所有符号变为 如果求最小值,那么我们打所有符号变为>=,然后对于等式a-b>=d, 依然连一天从b到a,权值位d的边,然后求最长路然后还需要注意各点之间的隐秘的约束关系,这里也要建边差分约束

2017-09-25 13:36:48 308

原创 tarjan求强连通分量

tarjan求强连通分量:我们知道,在有向图G中,如果任意两个顶点都是连通的(所谓连通就是两个顶点都能互相到达),那么这个图就是强连通图。非强连通图的极大强连通子图,被称为强连通分量。那么什么是极大强连通子图呢?举个例子帮助理解一下:例如下面图一所示,其中子图{1,2,3,5}就是一个极大强连通子图,子图{4}也是一个极大强连通子图。为什么会这样呢?对于“极大”的理解,就是在一

2017-09-15 13:41:17 351

原创 Monitor(二分,二维前缀和板子记录)

Monitortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Luba bought a monitor. Monitor is a rectan

2017-09-09 19:26:50 372

原创 Jury Meeting Codeforces Round #433 (Div. 2, based on Olympiad of Metropolises)(贪心,预处理?)

Jury Meetingtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputCountry of Metropolia is holding Olympiad of Metrpolises so

2017-09-08 18:31:12 279

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除