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_29276637_16766.cpp:5:9: error: "or" cannot be used as a macro name as it is an operator in C++
 #define or (o*2+1)
         ^
0_0_29276637_16766.cpp: In function 'void BuildTree(int, int, int)':
0_0_29276637_16766.cpp:21:15: error: expected primary-expression before 'or' token
     BuildTree(or,mid+1,r);
               ^
0_0_29276637_16766.cpp:21:17: error: expected primary-expression before ',' token
     BuildTree(or,mid+1,r);
                 ^
0_0_29276637_16766.cpp:22:39: error: expected primary-expression before 'or' token
     Tree[o].sum = Tree[ol].sum + Tree[or].sum;
                                       ^
0_0_29276637_16766.cpp:22:41: error: expected primary-expression before ']' token
     Tree[o].sum = Tree[ol].sum + Tree[or].sum;
                                         ^
0_0_29276637_16766.cpp: In function 'void Update(int, int, int)':
0_0_29276637_16766.cpp:34:16: error: expected primary-expression before 'or' token
         Update(or,l,r);
                ^
0_0_29276637_16766.cpp:34:18: error: expected primary-expression before ',' token
         Update(or,l,r);
                  ^
0_0_29276637_16766.cpp:42:20: error: expected primary-expression before 'or' token
             Update(or,mid+1,r);
                    ^
0_0_29276637_16766.cpp:42:22: error: expected primary-expression before ',' token
             Update(or,mid+1,r);
                      ^
0_0_29276637_16766.cpp:45:39: error: expected primary-expression before 'or' token
     Tree[o].sum = Tree[ol].sum + Tree[or].sum;
                                       ^
0_0_29276637_16766.cpp:45:41: error: expected primary-expression before ']' token
     Tree[o].sum = Tree[ol].sum + Tree[or].sum;
                                         ^
0_0_29276637_16766.cpp: In function 'long long int Query(int, int, int)':
0_0_29276637_16766.cpp:53:22: error: expected primary-expression before 'or' token
         return Query(or,l,r);
                      ^
0_0_29276637_16766.cpp:53:24: error: expected primary-expression before ',' token
         return Query(or,l,r);
                        ^
0_0_29276637_16766.cpp:60:44: error: expected primary-expression before 'or' token
             return Query(ol,l,mid) + Query(or,mid+1,r);
                                            ^
0_0_29276637_16766.cpp:60:46: error: expected primary-expression before ',' token
             return Query(ol,l,mid) + Query(or,mid+1,r);
                                              ^
0_0_29276637_16766.cpp: In function 'int main()':
0_0_29276637_16766.cpp:68:35: error: 'memset' was not declared in this scope
         memset(Tree,0,sizeof(Tree));
                                   ^


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-11-25 17:32:06, Gzip enabled