Shirlies
宁静专注认真的程序媛~
摘要: 晕,这一题我竟然修改了很长时间,汗,关键在自己对字符串处理好像还是不是很熟练#include "stdio.h"#include "math.h"int main(){int n;char ch;char c[300],target[10],re[1000];int count=1;int m,s,i,j;scanf("%d",&n);while(n){getchar();//注意啊!while((ch=getchar())!='\n');fgets(c,sizeof(c),stdin);scanf(" 阅读全文
posted @ 2012-02-03 18:15 Shirlies 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 二叉树的基本题型,不过对于我来说还是有点考验的……#include "stdio.h"int inorder[10005];int postorder[10005];int sum;int min1,min2;int find(int a,int *p,int n){int i;for(i=n-1;i>=0;i--)if(p[i]==a)return i;return 0;}void tree_min_node(int n,int *d1,int *d2,int sum){int k;if(n<=0) return;k=find(d1[n-1],d2,n);su 阅读全文
posted @ 2012-02-03 12:05 Shirlies 阅读(653) 评论(0) 推荐(0) 编辑