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_38847664_30842.cpp: In function 'int main()':
0_0_38847664_30842.cpp:79:33: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   79 |       while (i < r) add(s[++i], res);
      |                                 ^~~
0_0_38847664_30842.cpp:31:28: note:   initializing argument 2 of 'void add(int, long long int&)'
   31 | void add(int x, long long& res) {
      |                 ~~~~~~~~~~~^~~
0_0_38847664_30842.cpp:80:33: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   80 |       while (i > r) del(s[i--], res);
      |                                 ^~~
0_0_38847664_30842.cpp:36:28: note:   initializing argument 2 of 'void del(int, long long int&)'
   36 | void del(int x, long long& res) {
      |                 ~~~~~~~~~~~^~~
0_0_38847664_30842.cpp:81:33: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   81 |       while (j > l) add(s[--j], res);
      |                                 ^~~
0_0_38847664_30842.cpp:31:28: note:   initializing argument 2 of 'void add(int, long long int&)'
   31 | void add(int x, long long& res) {
      |                 ~~~~~~~~~~~^~~
0_0_38847664_30842.cpp:82:33: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   82 |       while (j < l) del(s[j++], res);
      |                                 ^~~
0_0_38847664_30842.cpp:36:28: note:   initializing argument 2 of 'void del(int, long long int&)'
   36 | void del(int x, long long& res) {
      |                 ~~~~~~~~~~~^~~
0_0_38847664_30842.cpp:83:40: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   83 |       while (t < ts) modify(j, i, ++t, res);
      |                                        ^~~
0_0_38847664_30842.cpp:41:45: note:   initializing argument 4 of 'void modify(int, int, int, long long int&)'
   41 | void modify(int l, int r, int t, long long& res) {
      |                                  ~~~~~~~~~~~^~~
0_0_38847664_30842.cpp:84:40: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   84 |       while (t > ts) modify(j, i, t--, res);
      |                                        ^~~
0_0_38847664_30842.cpp:41:45: note:   initializing argument 4 of 'void modify(int, int, int, long long int&)'
   41 | void modify(int l, int r, int t, long long& res) {
      |                                  ~~~~~~~~~~~^~~


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.001000(s) query 1, Server time : 2025-02-17 07:41:21, Gzip enabled