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_38510199_24489.cpp:18:49: error: array must be initialized with a brace-enclosed initializer
   array<shared_ptr<Node>, 2> ch{nullptr, nullptr};
                                                 ^
0_0_38510199_24489.cpp:18:49: error: too many initializers for 'std::array<std::shared_ptr<Node>, 2ull>'
0_0_38510199_24489.cpp: In static member function 'static std::pair<std::shared_ptr<Node>, std::shared_ptr<Node> > PTreap<T>::split(std::shared_ptr<Node>, int)':
0_0_38510199_24489.cpp:80:12: error: expected unqualified-id before '[' token
       auto [l, r] = split(n->ch[0], pos);
            ^
0_0_38510199_24489.cpp:82:19: error: 'r' was not declared in this scope
       nn->ch[0] = r;
                   ^
0_0_38510199_24489.cpp:84:15: error: 'l' was not declared in this scope
       return {l, nn};
               ^
0_0_38510199_24489.cpp:87:12: error: expected unqualified-id before '[' token
       auto [l, r] = split(n->ch[1], pos);
            ^
0_0_38510199_24489.cpp:89:19: error: 'l' was not declared in this scope
       nn->ch[1] = l;
                   ^
0_0_38510199_24489.cpp:91:19: error: 'r' was not declared in this scope
       return {nn, r};
                   ^
0_0_38510199_24489.cpp: In member function 'void PTreap<T>::insert(int, const T&)':
0_0_38510199_24489.cpp:97:10: error: expected unqualified-id before '[' token
     auto [l, r] = split(root, pos - 1);
          ^
0_0_38510199_24489.cpp:98:24: error: 'l' was not declared in this scope
     root = merge(merge(l, make_shared<Node>(val)), r);
                        ^
0_0_38510199_24489.cpp:98:52: error: 'r' was not declared in this scope
     root = merge(merge(l, make_shared<Node>(val)), r);
                                                    ^
0_0_38510199_24489.cpp: In member function 'void PTreap<T>::erase(int)':
0_0_38510199_24489.cpp:102:10: error: expected unqualified-id before '[' token
     auto [lm, r] = split(root, pos);  // <= pos, > pos
          ^
0_0_38510199_24489.cpp:103:10: error: expected unqualified-id before '[' token
     auto [l, m] = split(lm, pos - 1);
          ^
0_0_38510199_24489.cpp:104:18: error: 'l' was not declared in this scope
     root = merge(l, r);
                  ^
0_0_38510199_24489.cpp:104:21: error: 'r' was not declared in this scope
     root = merge(l, r);
                     ^
0_0_38510199_24489.cpp: In member function 'void PTreap<T>::sub(int, int, std::shared_ptr<Node>)':
0_0_38510199_24489.cpp:109:10: error: expected unqualified-id before '[' token
     auto [lm, r] = split(root, right);
          ^
0_0_38510199_24489.cpp:110:10: error: expected unqualified-id before '[' token
     auto [l, m] = split(lm, left - 1);
          ^
0_0_38510199_24489.cpp:111:24: error: 'l' was not declared in this scope
     root = merge(merge(l, n), r);
                        ^
0_0_38510199_24489.cpp:111:31: error: 'r' was not declared in this scope
     root = merge(merge(l, n), r);
                               ^
0_0_38510199_24489.cpp: In member function 'std::shared_ptr<Node> PTreap<T>::get(int, int)':
0_0_38510199_24489.cpp:116:10: error: expected unqualified-id before '[' token
     auto [lm, r] = split(root, right);
          ^
0_0_38510199_24489.cpp:117:10: error: expected unqualified-id before '[' token
     auto [l, m] = split(lm, left - 1);
          ^
0_0_38510199_24489.cpp:119:12: error: 'm' was not declared in this scope
     return m;
            ^
0_0_38510199_24489.cpp: In member function 'T PTreap<T>::query(int, int)':
0_0_38510199_24489.cpp:124:10: error: expected unqualified-id before '[' token
     auto [lm, r] = split(root, right);
          ^
0_0_38510199_24489.cpp:125:10: error: expected unqualified-id before '[' token
     auto [l, m] = split(lm, left - 1);
          ^
0_0_38510199_24489.cpp:126:13: error: 'm' was not declared in this scope
     T res = m->a;
             ^


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-25 16:33:15, Gzip enabled