Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

大家帮忙看看 !

Posted by nuciedh at 2007-03-15 18:26:35
全局变量int n在执行这个函数之后,值改变了,是怎么回事 ?我没该n的值啊 !
void segment::construct (int left, int right)
{
     if (left < right)
     {
              l = left;
              r = right;
              col = nocolor;
              if (left + 1 < right)
              {
                       lchild = &tree[Len ++];
                       rchild = &tree[Len ++];
                       int mid = (left + right) / 2;
                       lchild->construct (left, mid);
                       rchild->construct (mid, right);
              }
              else
              {
                  lchild = rchild = NULL;
              }
     }
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator