F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_26298063_467.cpp: In function 'int main()':
0_0_26298063_467.cpp:32:49: error: too few arguments to function 'int query_tree(const int&, const int&, const int&, const int&, const int&)'
     printf("%d\n", query_tree(root, i - 1, j - 1));
                                                 ^
0_0_26298063_467.cpp:16:5: note: declared here
 int query_tree(const int &p, const int &i, const int &j, const int &l, const int &r);
     ^
0_0_26298063_467.cpp:34:28: error: too few arguments to function 'void add_tree(const int&, const int&, const int&, const int&, const int&)'
     add_tree(root, i - 1, j);
                            ^
0_0_26298063_467.cpp:15:6: note: declared here
 void add_tree(const int &p, const int &pos, const int &val, const int &l, const int &r);
      ^
0_0_26298063_467.cpp:36:29: error: too few arguments to function 'void add_tree(const int&, const int&, const int&, const int&, const int&)'
     add_tree(root, i - 1, -j);
                             ^
0_0_26298063_467.cpp:15:6: note: declared here
 void add_tree(const int &p, const int &pos, const int &val, const int &l, const int &r);
      ^
0_0_26298063_467.cpp: In function 'int build_tree(const int&, const int&, const int&)':
0_0_26298063_467.cpp:44:2: error: 'l' was not declared in this scope
  l[p] = i; r[p] = j;
  ^
0_0_26298063_467.cpp:44:12: error: 'r' was not declared in this scope
  l[p] = i; r[p] = j;
            ^
0_0_26298063_467.cpp: In function 'void add_tree(const int&, const int&, const int&)':
0_0_26298063_467.cpp:55:6: error: 'l' was not declared in this scope
  if (l[p] == r[p])
      ^
0_0_26298063_467.cpp:55:14: error: 'r' was not declared in this scope
  if (l[p] == r[p])
              ^
0_0_26298063_467.cpp:57:11: error: 'r' was not declared in this scope
  if (i <= r[p << 1])
           ^
0_0_26298063_467.cpp:59:16: error: 'l' was not declared in this scope
  else if (i >= l[(p << 1) + 1])
                ^
0_0_26298063_467.cpp: In function 'int query_tree(const int&, const int&, const int&)':
0_0_26298063_467.cpp:66:6: error: 'l' was not declared in this scope
  if (l[p] == i && r[p] == j)
      ^
0_0_26298063_467.cpp:66:19: error: 'r' was not declared in this scope
  if (l[p] == i && r[p] == j)
                   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-02 12:48:14, Gzip enabled