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_28334595_29001.cpp: In member function 'int Segment_tree::query(int)':
0_0_28334595_29001.cpp:58:14: error: 'L' was not declared in this scope
          for(L+=leaf-1,R+=leaf+1;L^R^1;L>>=1,R>>=1,cnt_tot<<=1)
              ^
0_0_28334595_29001.cpp:58:24: error: 'R' was not declared in this scope
          for(L+=leaf-1,R+=leaf+1;L^R^1;L>>=1,R>>=1,cnt_tot<<=1)
                        ^
0_0_28334595_29001.cpp:65:18: error: 'L' was not declared in this scope
             for(;L;L>>=1,R>>=1)ret+=lazy[L]*cntL,ret+=lazy[R]*cntR;
                  ^
0_0_28334595_29001.cpp:65:26: error: 'R' was not declared in this scope
             for(;L;L>>=1,R>>=1)ret+=lazy[L]*cntL,ret+=lazy[R]*cntR;
                          ^
0_0_28334595_29001.cpp: In function 'int main()':
0_0_28334595_29001.cpp:143:62: error: no matching function for call to 'Segment_tree::query(int&, int&)'
             else if(type[0]=='Q')read(a),print(tree.query(a,a)),putchar('\n');
                                                              ^
0_0_28334595_29001.cpp:143:62: note: candidate is:
0_0_28334595_29001.cpp:54:20: note: int Segment_tree::query(int)
         inline int query(int pos)
                    ^
0_0_28334595_29001.cpp:54:20: note:   candidate expects 1 argument, 2 provided


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-07-06 04:18:23, Gzip enabled