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_38902077_12888.cpp: In function 'void build(long long int&, long long int, long long int)':
0_0_38902077_12888.cpp:68:22: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   68 | #define ls(x) tre[x].ls
      |               ~~~~~~~^~
0_0_38902077_12888.cpp:84:15: note: in expansion of macro 'ls'
   84 |         build(ls(x), l, mid); build(rs(x), mid + 1, r);
      |               ^~
0_0_38902077_12888.cpp:77:16: note:   initializing argument 1 of 'void build(long long int&, long long int, long long int)'
   77 | void build(ll& x, ll l, ll r) {
      |                ^
0_0_38902077_12888.cpp:69:22: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   69 | #define rs(x) tre[x].rs
      |               ~~~~~~~^~
0_0_38902077_12888.cpp:84:37: note: in expansion of macro 'rs'
   84 |         build(ls(x), l, mid); build(rs(x), mid + 1, r);
      |                                     ^~
0_0_38902077_12888.cpp:77:16: note:   initializing argument 1 of 'void build(long long int&, long long int, long long int)'
   77 | void build(ll& x, ll l, ll r) {
      |                ^
0_0_38902077_12888.cpp: In function 'void update(long long int, long long int, long long int, long long int, long long int&, long long int, long long int)':
0_0_38902077_12888.cpp:69:22: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   69 | #define rs(x) tre[x].rs
      |               ~~~~~~~^~
0_0_38902077_12888.cpp:98:40: note: in expansion of macro 'rs'
   98 |                 update(l, r, d, rs(p), rs(q), mid + 1, cr);
      |                                        ^~
0_0_38902077_12888.cpp:87:41: note:   initializing argument 5 of 'void update(long long int, long long int, long long int, long long int, long long int&, long long int, long long int)'
   87 | void update(ll l, ll r, ll d, ll p, ll& q, ll cl, ll cr) {
      |                                         ^
0_0_38902077_12888.cpp:68:22: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   68 | #define ls(x) tre[x].ls
      |               ~~~~~~~^~
0_0_38902077_12888.cpp:100:40: note: in expansion of macro 'ls'
  100 |                 update(l, r, d, ls(p), ls(q), cl, mid);
      |                                        ^~
0_0_38902077_12888.cpp:87:41: note:   initializing argument 5 of 'void update(long long int, long long int, long long int, long long int, long long int&, long long int, long long int)'
   87 | void update(ll l, ll r, ll d, ll p, ll& q, ll cl, ll cr) {
      |                                         ^


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-06-21 13:11:31, Gzip enabled