- 博客(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/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
空空如也
sdut oj上的题目总是越界 哪里有问题?
2016-06-20
这个环境配置要怎么改?
2016-06-04
知道二叉树的中序和后序建立二叉树的代码哪里有问题?为什么只能建立3个结点?
2016-05-14
知道二叉树的后序遍历和中序遍历求深度的代码那有错?
2016-05-14
关于二叉树的创建与遍历 请问哪里有问题我的代码
2016-05-09
金字塔问题 错在哪了 谢谢
2015-10-06
新手求助 画金字塔问题 错在哪 万分感激
2015-10-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人