自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 资源 (21)
  • 收藏
  • 关注

原创 poj 1417 True Liars(并查集+DP)

/poj 1417 True Liars(并查集+DP)#include#include#include#include#include#includeusing namespace std;const int N=1000;int father[N];int rank[N];int n,p1,p2;int vis[N];int kn;//集合数量int vec1[N]

2014-07-27 20:19:11 349

原创 poj Parity game(带权并查集)

//poj Parity game(带权并查集)//换化数据#include#include#include#include#includeusing namespace std;const int N=20000;int father[N];int rank[N];int m,n;int dk;map mp;void init(){ dk=1; fo

2014-07-26 22:43:09 532

原创 hdu 1496 Equations(hash+暴力)

//hdu 1496 Equations(hash+暴力)#include #include #include #include using namespace std;const int N=1000009;int hash1[N];//正int hash2[N];//负int main(){ int temp, sum; int a, b, c, d;

2014-07-26 19:44:11 343

原创 hdu Crazy Search(Hash)

//hdu Crazy Search(Hash)#include#include#includeusing namespace std;const int N=16000010;char str1[N];bool hash[N];int ascii[266];int main(){ int n,nc; int len; int t; cin>>t

2014-07-26 16:58:47 333

原创 K - Cube Stacking(并查集)

K - Cube StackingTime Limit:2000MS     Memory Limit:30000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionFarmer John and Betsy are playing a game with N (1 <= N <= 30,0

2014-07-26 10:56:53 327

原创 poj 1002 487-3279(使用STL map)

//poj 1002 487-3279(使用STL map)#include#include#include#include#include#includeusing namespace std;int ma[120];void init(){ ma['-']=10; for(int i=0;i<3;i++) { ma['A'+i]=2;

2014-07-25 19:22:13 323

原创 poj 2418 Hardwood Species(使用STL map)

//poj 2418 Hardwood Species(使用STL map)#include#include#include#include#includeusing namespace std;map mp;map::iterator it;int main(){ char a[33]; string str; int n=0; while(g

2014-07-25 17:39:39 310

原创 poj 3481 Double Queue(使用STL map)

//poj 3481 Double Queue(使用STL map)#include#include#includeusing namespace std;map mp;map::iterator it;int main(){ int op,num,pri; while(scanf("%d",&op)==1) { if(op==1)

2014-07-25 17:19:31 378

原创 poj2418 Hardwood Species(AVL树(平衡二叉树)中序遍历=排序)

//poj 2418 Hardwood Species(AVL树(平和二叉树)+中序遍历=>排序)#include#include#includeusing namespace std;struct AVLtree{ char name[33]; int count; int nheight; struct AVLtree *pleft; str

2014-07-25 14:17:59 945

原创 poj 2418 Hardwood Species(二叉搜索数+中序遍历=排序)

//poj 2418 Hardwood Species(二叉搜索数+中序遍历=排序)#include#include#includeusing namespace std;const int N=35;struct node{ char name[N]; int count; struct node *lchild,*rchild;}tree;//stru

2014-07-23 20:44:26 277

原创 J - Find them, Catch them(并查集)

J - Find them, Catch themTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe police office in Tadu City decides to say ends to t

2014-07-22 10:41:54 541

原创 fafu 1453 DNA排序

#include #include #include #include using namespace std;int count(const string &s){ int sum = 0; for(int i = 0;i < s.size();i++) for(int j = i+1; j <s.size(); j++) if

2014-07-21 20:58:02 384

原创 I - 食物链(带权的并查集)

I - 食物链Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道

2014-07-21 20:05:02 350

原创 H - Highways(最小生成树prim)

H - HighwaysTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flat

2014-07-21 17:04:16 340

原创 G - The Unique MST(最小生成树的次生成树)

G - The Unique MSTTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionGiven a connected undirected graph, tell if its minimum spanni

2014-07-21 14:51:52 290

原创 E - Network(最小生成树)

E - NetworkTime Limit:1000MS     Memory Limit:30000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAndrew is working as system administrator and is planning to establis

2014-07-20 16:15:06 385

原创 D - Ubiquitous Religions(并查集)

D - Ubiquitous ReligionsTime Limit:5000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThere are so many different religions in the world tod

2014-07-20 15:02:59 262

原创 B - Networking(prim求最小生成树)

B - NetworkingTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionYou are assigned to design network connections between certain p

2014-07-19 18:46:59 325

原创 hdu3549 (dinic求最大流)

//hdu3549 (dinic求最大流)#include#include#include#includeusing namespace std;const int N=20;int map[N][N];int layer[N];int n,m;int sta,end;int Min(int a,int b){ if(a<b) { return

2014-07-19 18:40:22 516

原创 A - Truck History(prim求最小生成树)

A - Truck HistoryTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. S

2014-07-19 16:59:52 338

原创 hdu 3549 Flow Problem(网络流增广路径主要算法)

//hdu 3549 Flow Problem(网络流增广路径主要算法)#include#include#include#includeusing namespace std;const int N=17;const int M=1100;const int Inf=100000000;int map[N][N];int pre[N];int n,m;int vis[N];

2014-07-18 21:57:42 552

原创 poj2485 Highways(kruskal求最小生成树)

//poj2485 Highways(kruskal求最小生成树)/*适合于稀疏图*/#include#include#include#includeusing namespace std;const int N=600;struct Node{ int from; int to; int value; Node(){} Node(int from,int

2014-07-18 16:31:20 404

原创 poj 2485 Highways(prim求最小生成树)

//poj 2485 Highways(prim求最小生成树)/*prim适合密图*/#include#include#includeusing namespace std;const int Inf=1000000000;const int N=510;int map[N][N];int vis[N];int ans;int dis[N];void prim(int

2014-07-18 15:43:59 347

原创 poj 1258 Agri-Net(prim求最小生成树)

//poj 1258 Agri-Net(pim求最小生成树)/*prim适合密图*/#include#include#includeusing namespace std;const int Inf=100000000;const int N=110;int map[N][N];int vis[N];int ans;int dis[N];void prim(int n)

2014-07-18 15:18:26 373

原创 蓝桥杯 道路和航路(SPFA算法求最短路径)

//蓝桥杯 道路和航路 (SPFA算法求最短路径)//超时的两组数据#include#include#include#includeusing namespace std;const int N=30000;const int Inf=100000000;struct node{ int to; int value; int next;};int

2014-07-17 20:35:57 861

原创 poj 1038 Bugs Integrated, Inc.(动态规划状态压缩)

//poj 1038 Bugs Integrated, Inc.(动态规划状态压缩)#include#include#includeusing namespace std;const int N=160;const int M=15;int sta[12]={0,1,3,9,27,81,243,729,2187,6561,19683,59049};int dp[2][60000];

2014-07-16 21:05:43 428

原创 poj 3071 Football(概率动态规划)

//poj 3071 Football(概率动态规划)/*============================ ^ | 0 1 2 3 4 5 6 7 ---------------------------- 0 | 0 1 2 3 4 5 6 7 1 | 1 0 3 2 5 4 7 6 2 | 2 3 0 1 6 7

2014-07-15 22:14:35 362

原创 蓝桥杯 算法训练 结点选择 (树形动态规划)

//蓝桥杯 算法训练 结点选择 (树形动态规划)#include#include#includeusing namespace std;const int N=100010;int n;int s[N];int dp[N][2]={0};int visit[N]={0};vector node[N];int Max(int a,int b){ if(a>b)

2014-07-15 19:00:38 778

原创 蓝桥杯 算法提高 金属采集 (树形动态规划)

// 蓝桥杯 算法提高 金属采集 (树形动态规划)#include#include#include#includeusing namespace std;const int N=100010;const int M=12;struct Node{ int child; int value;}s;int visit[N]={0};//判断是否遍历的节点int

2014-07-15 16:38:45 1409

原创 //POj 2533 Longest Ordered Subsequence(动态规划:最长不减子序列)

//POj 2533 Longest Ordered Subsequence(动态规划:最长不减子序列)#include#includeusing namespace std;const int N=5050;const int inf=1000000;int search_erfen(int b[N],int num,int right){int left=0;

2014-07-10 17:41:24 386

原创 POJ 1159 Palindrome(动态规划:最长回文子序列)

//POJ 1159 Palindrome(动态规划:最长回文子序列)#include#include#include#include#includeusing namespace std;int dp[2][5050];int Max(int a,int b){ if(a>b) { return a; } return b;}

2014-07-09 20:51:42 488

原创 hdu 1159 Common Subsequence(动态规划:最长公共子序列)

//hdu 1159 Common Subsequence(动态规划:最长公共子序列)#include#includeusing namespace std;const int N=1001;int dp[N][N];//二维数组存取char str1[N],str2[N];int len1,len2;int Max(int a,int b){ if(a>b) return

2014-07-08 21:43:32 359

原创 //hdu 1231 最大连续子序列 (动态规划)

//hdu 1231 最大连续子序列 (动态规划)#include#includeusing namespace std;const int N=10010;int s[N];int n;int sum;int Max;int ai,aj;int flag=0;void init(){ Max=0; sum=0; flag=0;}//========主要算法===

2014-07-08 18:47:39 342

原创 1576 A/B问题(扩展欧几里得)

//1576 A/B问题(扩展欧几里得)#include#includeusing namespace std;const int MOD=9973;void exGcd(int a,int b,int &x,int &y){ if(b==0) { x=1; y=0; return; } else { exGcd(b,a%b,x,y); int tem

2014-07-07 20:02:12 572

原创 hdu 1247 Hat’s Words(字典树)

//hdu 1247 Hat’s Words(字典树)#include#include#include#include using namespace std;const int N=50500;const int M=27;//字典树的数据结构struct node{ int next[26]; bool end;}tree[N*2];int pi=1;

2014-07-07 14:18:37 308

原创 1711 Number Sequence (KMP算法)

//1711 Number Sequence (KMP算法)#include#includeusing namespace std;const int N=1000009;const int M=10009;int sum[N];int su[M];int n,m;int next[M];void build_next(){ int i; int j=0;

2014-07-01 21:08:34 319

原创 hdu2087 剪花布条(KMP)

//hdu2087 剪花布条(KMP)#include#include#includeusing namespace std;const int N=1010;int next[N];char s1[N];char s2[N];int len1,len2;//==========KMP算法=====================void KMP_next()//这是next

2014-07-01 19:26:36 277

原创 hdu 1394 Minimum Inversion Number(树状数组)

//hdu 1934 Minimum Inversion Number(树状数组)#include#include#includeusing namespace std;const int N=6000;int c[N];int n;int num[N];//=========树状数组======int lowbit(int x)//核心{ return x&(-x)

2014-07-01 16:55:19 419

原创 hdu 1556 Color the ball(线段树)

//hdu 1556 Color the ball(线段树)#include#includeusing namespace std;const int N=301000;struct node{ int l; int r; int vu;}tree[N];void buildtree(int v,int l,int r)//建树初始状态都为0{ t

2014-07-01 11:50:33 350

HTML打地鼠

HTML打地鼠

2017-05-26

2013人民邮电出版社 iOS应用开发指南 使用HTML5、CSS3和JavaScript

2013人民邮电出版社 iOS应用开发指南 使用HTML5、CSS3和JavaScript

2016-10-22

25条提高iOSApp性能的建议和技巧

25条提高iOSApp性能的建议和技巧

2016-10-22

3D数学基础 图形与游戏开发

3D数学基础 图形与游戏开发

2016-10-22

IOS应用逆向工程:分析与实战

IOS应用逆向工程:分析与实战

2016-10-22

软件框架设计的艺术

软件框架设计的艺术

2016-10-22

算法导论中文版高清pdf版

算法导论中文版高清pdf版

2016-10-22

算法帝国PDF

算法帝国

2016-10-22

Android内核剖析(完整版)

Android内核剖析(完整版)

2016-10-22

The Art of Computer Programming

The Art of Computer Programming

2016-10-22

Windows驱动开发技术详解(pdf书和源代码)

Windows驱动开发技术详解(pdf书和源代码)

2016-10-22

APP间的相互跳转

简单APP间的相互跳转

2016-10-22

BLE-CC254x-1.3.2

BLE-CC254x-1.3.2是TI的蓝牙4.0开发包,蓝牙4.0堆栈开发

2016-07-15

BLE-CC254x-1.2.1

BLE-CC254x-1.2.1是TI的蓝牙4.0开发包,蓝牙4.0堆栈开发。

2016-07-15

SmartRF Flash Programmer 1.12.7

SmartRF Flash Programmer 1.12.7

2016-07-14

精通脚本黑客

2016-07-14

OllyDBG软件

OllyDBG is a debuger tool.

2016-07-14

空空如也

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

TA关注的人

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