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_38775484_26348.cpp: In function 'Tree ask(int, int&, int&)':
0_0_38775484_26348.cpp:108:46: error: cannot bind non-const lvalue reference of type 'std::vector<std::pair<int, int> >&' to an rvalue of type 'std::vector<std::pair<int, int> >'
  108 |                 pushup(jl.x, ask(l(p), l, r).x, ask(r(p), l, r).x);
      |                              ~~~~~~~~~~~~~~~~^
0_0_38775484_26348.cpp:51:68: note:   initializing argument 2 of 'void pushup(std::vector<std::pair<int, int> >&, std::vector<std::pair<int, int> >&, std::vector<std::pair<int, int> >&)'
   51 | void pushup(vector<pair<int, int> > &now, vector<pair<int, int> > &x, vector<pair<int, int> > &y){
      |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^


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-10 17:02:41, Gzip enabled