hiho Week 10 register

Ended

Participants:639

Verdict:Accepted
Score:100 / 100
Submitted:2014-09-06 21:30:59

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
using namespace std ;
typedef struct T
{
    char c ;
    struct T *l,*r ;
}TREE;
char s1[30],s2[30],s3[30];
TREE *h ;
void part( int ini , int l , int r , TREE *p ,int chi ,int e )
{
    int i ;
    TREE *q ;
    for ( i = l ; i < r ; i++ )
    {
        if ( s1[ini] == s2[i] )break;
    }
    if ( i == r )return ;
    if ( p == NULL )
    {
        p = new TREE  ;
        p->c = s1[0] ;
        p->l = NULL ;
        p->r = NULL ;
        h = p ;
        q = p ;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX