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_33338998_23063.cpp:3:11: error: 'N' was not declared in this scope
     int s[N],ls[N],rs[N],cnt=0;
           ^
0_0_33338998_23063.cpp:3:17: error: 'N' was not declared in this scope
     int s[N],ls[N],rs[N],cnt=0;
                 ^
0_0_33338998_23063.cpp:3:23: error: 'N' was not declared in this scope
     int s[N],ls[N],rs[N],cnt=0;
                       ^
0_0_33338998_23063.cpp: In function 'void seg::newnode(int&)':
0_0_33338998_23063.cpp:5:36: error: 's' was not declared in this scope
     void newnode(int &rt){rt=++cnt,s[rt]=ls[rt]=rs[rt]=0;}
                                    ^
0_0_33338998_23063.cpp:5:42: error: 'ls' was not declared in this scope
     void newnode(int &rt){rt=++cnt,s[rt]=ls[rt]=rs[rt]=0;}
                                          ^
0_0_33338998_23063.cpp:5:49: error: 'rs' was not declared in this scope
     void newnode(int &rt){rt=++cnt,s[rt]=ls[rt]=rs[rt]=0;}
                                                 ^
0_0_33338998_23063.cpp: In function 'void seg::update(int&, int, int, int, int)':
0_0_33338998_23063.cpp:8:29: error: 's' was not declared in this scope
         if(!rt)newnode(rt); s[rt]+=num; if(l==r)return;
                             ^
0_0_33338998_23063.cpp:9:17: error: 'mid' was not declared in this scope
         if(val<=mid)
                 ^
0_0_33338998_23063.cpp:11:20: error: 'ls' was not declared in this scope
             update(ls[rt],l,mid,val,num);
                    ^
0_0_33338998_23063.cpp:15:20: error: 'rs' was not declared in this scope
             update(rs[rt],mid+1,r,val,num);
                    ^
0_0_33338998_23063.cpp: In function 'int seg::query(int&, int, int, int)':
0_0_33338998_23063.cpp:20:41: error: 's' was not declared in this scope
         if(!rt)return 0; if(l==r)return s[rt];
                                         ^
0_0_33338998_23063.cpp:21:21: error: 'mid' was not declared in this scope
         return val<=mid?query(ls[rt],l,mid,val):query(rs[rt],mid+1,r,val);
                     ^
0_0_33338998_23063.cpp:21:31: error: 'ls' was not declared in this scope
         return val<=mid?query(ls[rt],l,mid,val):query(rs[rt],mid+1,r,val);
                               ^
0_0_33338998_23063.cpp:21:55: error: 'rs' was not declared in this scope
         return val<=mid?query(ls[rt],l,mid,val):query(rs[rt],mid+1,r,val);
                                                       ^


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-05 10:14:00, Gzip enabled