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_21794189_28297.cpp: In function 'll Query(ll&, int)':
0_0_21794189_28297.cpp:54:21: error: invalid types 'll {aka long long int}[int]' for array subscript
         ans += arr[x];
                     ^
0_0_21794189_28297.cpp: In function 'void Update(ll&, int, int)':
0_0_21794189_28297.cpp:66:14: error: invalid types 'll {aka long long int}[int]' for array subscript
         arr[x] += val;
              ^
0_0_21794189_28297.cpp: In function 'void AddNum(int)':
0_0_21794189_28297.cpp:74:34: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     curnum += (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
                                  ^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
 ll Query( ll &arr, int x)
    ^
0_0_21794189_28297.cpp:74:52: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     curnum += (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
                                                    ^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
 ll Query( ll &arr, int x)
    ^
0_0_21794189_28297.cpp:75:31: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     curnum += Query(cntsum,inx);
                               ^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
 ll Query( ll &arr, int x)
    ^
0_0_21794189_28297.cpp:76:24: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     Update(cntnum,inx,1);
                        ^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
 void Update( ll &arr, int x, int val)
      ^
0_0_21794189_28297.cpp:77:33: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     Update(cntsum,inx,value[inx]);
                                 ^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
 void Update( ll &arr, int x, int val)
      ^
0_0_21794189_28297.cpp: In function 'void DelNum(int)':
0_0_21794189_28297.cpp:82:25: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     Update(cntnum,inx,-1);
                         ^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
 void Update( ll &arr, int x, int val)
      ^
0_0_21794189_28297.cpp:83:34: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     Update(cntsum,inx,-value[inx]);
                                  ^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
 void Update( ll &arr, int x, int val)
      ^
0_0_21794189_28297.cpp:84:34: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     curnum -= (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
                                  ^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
 ll Query( ll &arr, int x)
    ^
0_0_21794189_28297.cpp:84:52: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     curnum -= (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
                                                    ^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
 ll Query( ll &arr, int x)
    ^
0_0_21794189_28297.cpp:85:31: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
     curnum -= Query(cntsum,inx);
                               ^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
 ll Query( ll &arr, int x)
    ^


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-16 19:19:08, Gzip enabled