自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 POJ1975解题报告-Floyd解决传递闭包

B - Median Weight BeadTime Limit:1000MS     Memory Limit:30000KB     64bit IO Format:%I64d & %I64uSubmit Status use MathJax to parse formulasDescriptionThere are N beads which of the same shape an...

2018-03-13 17:34:08 240

原创 POJ3660解题报告-Floyd解决传递闭包

A - Cow ContestTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status use MathJax to parse formulasDescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, a...

2018-03-13 17:14:51 250

转载 大数java

http://www.cnblogs.com/aiguona/p/7676460.html点击打开链接

2018-01-12 15:47:27 279

原创 寒假集训最小生成树专题

E - Agri-NetTime Limit:1000MS    Memory Limit:10000KB    64bit IO Format:%I64d & %I64uSubmitStatus use MathJax to parse formulasDescriptionFarmer John has been elected mayor of his t

2018-01-11 16:00:54 238

转载 最大流模板 HDU1532

关于最大流EK算法http://blog.youkuaiyun.com/hurmishine/article/details/53037362点击打开链接HDU1532Drainage DitchesTime Limit:1000MS    Memory Limit:10000KB    64bit IO Format:%I64d & %I64uDescription

2018-01-11 10:30:21 191

转载 最长值连续上升子序列

举例说明  2 1 3 4 5    最长值连续上升子序列为2 3 4 5  而不是最长连续(位置相邻)上升子序列 1 3 4 5自己写了个码,但是超时了...  #include#include#include#includeusing namespace std;const int N=1e5+5;int a[N],dp[N];int main(){ int n

2018-01-09 17:15:24 556

转载 二分图资源

http://www.cnblogs.com/aiguona/p/7665946.html点击打开链接http://dsqiu.iteye.com/blog/1689505点击打开链接

2018-01-09 16:12:44 213

原创 寒假集训个人赛 E

E - Guest From the PastTime Limit:1000MS    Memory Limit:262144KB    64bit IO Format:%I64d & %I64uSubmitStatus use MathJax to parse formulasDescriptionKolya Gerasimov loves kefir ver

2018-01-09 09:18:29 202

原创 寒假集训个人赛 D

D - War of the CorporationsTime Limit:1000MS    Memory Limit:262144KB    64bit IO Format:%I64d & %I64uSubmitStatus use MathJax to parse formulasDescriptionA long time ago, in a gal

2018-01-09 09:16:07 272

原创 寒假集训个人赛 A

A - New Year and DaysTime Limit:2000MS    Memory Limit:262144KB    64bit IO Format:%I64d & %I64uSubmitStatus use MathJax to parse formulasDescriptionToday is Wednesday, the third d

2018-01-09 09:14:09 205

转载 次短路

http://www.cnblogs.com/aiguona/p/7660251.html点击打开链接一、思想:求次短路,可以通过求最短路得到次短路长度1到n的次短路长度必然产生于:从1走到x的最短路 + edge[x][y] +  y到n的最短路首先预处理好1到每一个节点的最短路,和n到每一个节点的最短路然后枚举每一条边作为中间边(x,y)或者(y,x),如果加起来长度等

2018-01-08 10:52:14 1736

原创 二叉排序树 分析、梳理、代码总结

二叉排序树

2017-11-23 18:21:14 4597 1

原创 二叉树模板 先中后序遍历,非递归算法,层次遍历,叶子结点数,深度

二叉树模板

2017-11-21 19:32:27 616

转载 转载 ACM博弈

博弈

2017-11-17 18:20:28 234

原创 HDU1698 线段树

Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same

2017-11-17 16:06:50 230

原创 POJ3468 线段树模板

DescriptionYou have N integers, A1, A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other

2017-11-16 20:05:47 191

原创 HDU1215 打表

Problem Description七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!"人们纷纷来到告示前,都想知道谁才是自己的另一半.告示省略将你的编号的所有的因子加起来得到的编号的主人就是你的另一半数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6

2017-11-15 20:50:29 250

原创 筛选法求素数模板

筛选法求素数

2017-11-15 19:17:27 1627

原创 HDU 1754 I hate it 线段树 单点修改、最大值

线段树 单点修改、最大值模板

2017-11-14 19:18:57 219

原创 HDU1754 I hate it 线段树 最大值

线段树最大值模板

2017-11-14 19:15:58 243

原创 HDU1166 线段树 单点修改、区间查询

线段树 单点修改、区间查询模板

2017-11-14 19:07:26 280

原创 HDU1863 最小生成树 prim模版

prim模版

2017-11-12 20:02:28 235

转载 并查集模版

并查集模版

2017-11-12 20:00:46 186

原创 HDU2149 巴什博弈

巴什博弈

2017-11-12 19:58:26 227

原创 POJ1067 威佐夫博弈

威佐夫博弈

2017-11-12 19:34:49 183

原创 hdu 1517 博弈

不知道为什么,按自己的方法写,unsigned int 和long long都是wrong answer此题可以归属于找规律  注意与PN图分开  当数增大时,stan开始出的数字是可以改变的重要的数字是2 和 9  注意A可能为了对B不利而出2但是没阻止B赢(可能只有自己懂这句话)B可能就算出9也赢不了这两种特殊的状态之间的转变总之,规律是2-9 s win

2017-11-08 20:44:43 177

转载 djkstra 我的dijkstra模板

//根据大神模板修改加注释的我的小菜鸟模板,如有错误欢迎指正!#include #include#includeusing namespace std;const int N=1005;const int MAX=0x3f3f3f3f;int mapa[N][N]; //邻接矩阵存图的结构int flag[N],dis[N]; //fl

2017-11-05 14:37:28 417

原创 二叉树 二叉树带虚结点表示的先序遍历可以确定唯一一颗二叉树

二叉树模版变形

2017-10-31 14:53:52 2661

原创 树 二叉树基础

二叉树模版

2017-10-31 11:18:10 155

原创 山理工2135 队列 排队买饭

单纯用队列不好模拟中间离队的人,因为队列只能取队首元素所以用一维数组模拟队列#include #include#includeusing namespace std;int main(){ char s[10]; int a[10050]; int i,j,k,m,n,begin,end,x; scanf("%d",&m); for(i=0

2017-10-31 11:08:57 242

原创 栈 行编辑器 缓冲区

利用栈后进先出的特点实现缓冲区遇到#:取栈顶元素遇到@:取栈顶元素直到空栈#include #include#include#includeusing namespace std;int main(){ char b[270],a[270]; int i,k,len; stack s; while(gets(b)!=NULL){

2017-10-31 11:03:11 300

原创 HDU1434 优先队列 幸福列车

优先队列头文件:#include<queue>初始化:priority_queue<类型type,容器vector<type>,比较方式less<type>/greater<type> >q;简写:priority_queue<type>q;默认大顶堆入队:q.push()出队:q.pop()取首:q.top() 注意:队列是q.front()判空:q.empty()

2017-10-31 10:47:06 329

原创 求最大子数组和

当sum当sum>0时,让sum与maxa比较#include #include#includeusing namespace std;int main(){ char c=0; vector a; int i=0,k,sum,maxa,b; while(~scanf("%d",&b)){ a.push_back(b);

2017-10-31 10:40:05 190

原创 栈 括号匹配

遇到所有的左括号,入栈,(标记为1,【标记为2,{标记为3遇到所有的右括号,取栈顶元素,)相对应的是否为1,】是否为2,}是否为3如果不是,break出来#include #include#include#includeusing namespace std;int main(){ char a[100]; int i,flag=0,len; sta

2017-10-31 10:27:03 183

原创 栈 出栈序列

栈为空:1~a[0]进栈,a[0]出栈a[1]>a[0]:a[0]+1~a[1]进栈,a[1]出栈a[1]接着比较出栈元素与原数组元素是否相等如有错误,欢迎指正

2017-10-31 10:18:58 253

原创 栈 判断回文序列

利用栈先进后出的特点判断回文序列

2017-10-31 10:14:29 2008

空空如也

空空如也

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

TA关注的人

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