自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 编写最小生成树代码遇到的小问题

#include#include#include#include#define max 0x3f3f3f3fusing namespace std;int map[200][200];int mark[200];int low[200];int n,m,a,b,c,sum,i,j;/*int prim(int pos){ int min; mark[pos]=

2016-08-18 20:14:53 332

原创 引用参数需要左值 比如下列代码中出现的问题

#include#include#includeint mark[10060];int zhan[10060];int di,ding;int k,m,bg,u,v;struct node{    int data;    struct node *firstarc;};struct tu{    struct node dingdian[2

2016-08-13 21:33:26 269

原创 引用参数&

http://blog.csdn.net/qianchenglenger/article/details/16949689

2016-08-13 20:58:42 358

原创 平衡二叉树理解

http://blog.csdn.net/guoqingshuang/article/details/50190119 原文地址#include#includestruct node{ int data; int d; struct node *lchild,*rchild;};int max(int x,int y){ return x>y?x:y;

2016-08-10 21:36:11 245

原创 pat 家谱处理

http://blog.csdn.net/xmzyjr123/article/details/52015445    源代码地址#include #include struct people { int num; char name[15]; char father[15];}t1[101];int main(){ int n, m,i; char na[71]; s

2016-08-10 10:40:02 481

原创 5-1 顺序存储的二叉树的最近的公共祖先问题 (25分)

#include#includeint a[1055];int father;int fatherzhi;void zhaobaba(int n1,int n2){ //printf("%d***%d\n",n1,a[n1]); int mark=1; while(mark) { if(n1>n2) n1=n1/2; e

2016-08-09 20:16:55 3006 1

原创 人活着系列之芳姐和她的猪

http://blog.csdn.net/lucky_vikey/article/details/38424353 原文地址#include#include#define max 10000000 //为什么改成#define max 0x7FFFFFFF 答案就会有错误?int dis[700][700];int juan[10050];

2016-08-05 21:10:28 254

原创 E-最小生成树

代码是看的别人的   排序必须要有选择性 不然会超时  算法必须用克鲁斯卡尔的 用到了并查集#include#include#include#includeusing namespace std;struct node{ int u,v,w;}bian[200010],t;int zhangmen[50010],n,m,ans;int cmp(const void *

2016-08-04 15:57:46 251

原创 出栈序列判定 网上一些代码虽然能AC但是有bug

比如输入51 2 3 4 514 5 3 2 1会输出 no 但应该输出yes 改善后的代码#include#includeint a[10050];int b[10050];int c[10050];int main(){ int n,i; scanf("%d",&n); for(i=0;i<=n-1;i++) {

2016-08-04 14:12:04 196

空空如也

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

TA关注的人

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