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_38713926_18918.cpp: In function 'long long int SegmentTree::queryMaxLength(long long int, long long int)':
0_0_38713926_18918.cpp:103:38: error: cannot bind non-const lvalue reference of type 'SegmentTree::Node&' to an rvalue of type 'SegmentTree::Node'
  103 |             res1=mergeNodes(queryNode(1,dfn[topx],dfn[x]),res1);
      |                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
0_0_38713926_18918.cpp:78:27: note:   initializing argument 1 of 'SegmentTree::Node SegmentTree::mergeNodes(Node&, Node&)'
   78 |     Node mergeNodes(Node &L,Node &R){
      |                     ~~~~~~^
0_0_38713926_18918.cpp:107:34: error: cannot bind non-const lvalue reference of type 'SegmentTree::Node&' to an rvalue of type 'SegmentTree::Node'
  107 |         res2=mergeNodes(queryNode(1,dfn[x],dfn[y]),res2);
      |                         ~~~~~~~~~^~~~~~~~~~~~~~~~~
0_0_38713926_18918.cpp:78:27: note:   initializing argument 1 of 'SegmentTree::Node SegmentTree::mergeNodes(Node&, Node&)'
   78 |     Node mergeNodes(Node &L,Node &R){
      |                     ~~~~~~^


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-12-02 05:25:00, Gzip enabled