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_21484341_29824.cpp: In function 'void pushdown(int)':
0_0_21484341_29824.cpp:12:15: error: invalid use of non-lvalue array
  tree[root<<1]+=add[root];
               ^
0_0_21484341_29824.cpp:12:15: error:   in evaluation of 'operator+=(double [15], double [15])'
0_0_21484341_29824.cpp:13:17: error: invalid use of non-lvalue array
  tree[root<<1|1]+=add[root];
                 ^
0_0_21484341_29824.cpp:13:17: error:   in evaluation of 'operator+=(double [15], double [15])'
0_0_21484341_29824.cpp:14:14: error: invalid use of non-lvalue array
  add[root<<1]+=add[root];
              ^
0_0_21484341_29824.cpp:14:14: error:   in evaluation of 'operator+=(double [15], double [15])'
0_0_21484341_29824.cpp:15:16: error: invalid use of non-lvalue array
  add[root<<1|1]+=add[root];
                ^
0_0_21484341_29824.cpp:15:16: error:   in evaluation of 'operator+=(double [15], double [15])'
0_0_21484341_29824.cpp:16:11: error: incompatible types in assignment of 'int' to 'double [15]'
  add[root]=0;
           ^
0_0_21484341_29824.cpp: In function 'void update(int, int, int, int, int, double)':
0_0_21484341_29824.cpp:22:13: error: invalid operands of types 'double [15]' and 'double' to binary 'operator+'
   tree[root]+=k;
             ^
0_0_21484341_29824.cpp:22:13: error:   in evaluation of 'operator+=(double [15], double)'
0_0_21484341_29824.cpp:23:12: error: invalid operands of types 'double [15]' and 'double' to binary 'operator+'
   add[root]+=k;
            ^
0_0_21484341_29824.cpp:23:12: error:   in evaluation of 'operator+=(double [15], double)'
0_0_21484341_29824.cpp:4:13: error: invalid operands of types 'double [15]' and 'double' to binary 'operator>'
 #define eps 1e-8
             ^
0_0_21484341_29824.cpp:26:15: note: in expansion of macro 'eps'
  if(add[root]>eps)pushdown(root);
               ^
0_0_21484341_29824.cpp:35:12: error: invalid array assignment
  tree[root]=min(tree[root<<1],tree[root<<1|1]);
            ^
0_0_21484341_29824.cpp: In function 'double query(int, int, int, int, int)':
0_0_21484341_29824.cpp:40:19: error: cannot convert 'double*' to 'double' in return
   return tree[root];
                   ^
0_0_21484341_29824.cpp:4:13: error: invalid operands of types 'double [15]' and 'double' to binary 'operator>'
 #define eps 1e-8
             ^
0_0_21484341_29824.cpp:41:15: note: in expansion of macro 'eps'
  if(add[root]>eps)pushdown(root);
               ^
0_0_21484341_29824.cpp:46:12: error: invalid array assignment
  tree[root]=min(tree[root<<1],tree[root<<1|1]);
            ^
0_0_21484341_29824.cpp: In function 'int main()':
0_0_21484341_29824.cpp:68:22: error: invalid conversion from 'int*' to 'int' [-fpermissive]
     update(last[a[i]]+1,i,1,n,1,1);
                      ^
0_0_21484341_29824.cpp:18:6: note: initializing argument 1 of 'void update(int, int, int, int, int, double)'
 void update(int l,int r,int L,int R,int root,double k)
      ^
0_0_21484341_29824.cpp:70:15: error: incompatible types in assignment of 'int' to 'int [15]'
     last[a[i]]=i;
               ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-11 16:54:09, Gzip enabled