摘要:
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2137&cid=1145View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<malloc.h> 4 typedef struct tree 5 { 6 char data ; 7 struct tree *l, *r ; 8 }tree ; 9 tree *creat(char *root, char *in, int k ) 10 { 11 ... 阅读全文
摘要:
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2136&cid=1145View Code 1 #include<stdio.h> 2 #include<malloc.h> 3 typedef struct node 4 { 5 char data ; 6 struct node *l, *r ; 7 }tree ; 8 tree *t ; 9 tree *creat(tree *t) 10 { 11 char c ; 12 if((c = get... 阅读全文
摘要:
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2126View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 int cmp(const void *a, const void *b) 4 { 5 return(*(int*)b - *(int*)a) ; 6 } 7 int main() 8 { 9 int n, m, i,a[100001] ;10 while(scanf("%d %d", &a 阅读全文
摘要:
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2128View Code 1 #include<stdio.h> 2 #include<malloc.h> 3 typedef struct tree 4 { 5 int data; 6 struct tree *l,*r; 7 }tree; 8 int k; 9 void creat(tree *t,int a) 10 { 11 tree *p; 12 p = ... 阅读全文