Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

1_858_3087_24115.cpp:11:30: error: 'less' was not declared in this scope
 typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbt;
                              ^
1_858_3087_24115.cpp:11:30: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 1_858_3087_24115.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:367:12: note:   'std::less'
     struct less : public binary_function<_Tp, _Tp, bool>
            ^
1_858_3087_24115.cpp:11:38: error: template argument 3 is invalid
 typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbt;
                                      ^
1_858_3087_24115.cpp:11:39: error: expected unqualified-id before ',' token
 typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbt;
                                       ^
1_858_3087_24115.cpp:11:52: error: invalid type in declaration before ',' token
 typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbt;
                                                    ^
1_858_3087_24115.cpp:11:87: error: expected initializer before '>' token
 typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbt;
                                                                                       ^
1_858_3087_24115.cpp: In function 'int main()':
1_858_3087_24115.cpp:22:3: error: 'set' was not declared in this scope
   set.insert(sequence[i]);
   ^
1_858_3087_24115.cpp:22:3: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/detail/container_base_dispatch.hpp:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/assoc_container.hpp:48,
                 from 1_858_3087_24115.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:90:11: note:   'std::set'
     class set
           ^
1_858_3087_24115.cpp:26:36: error: 'set' was not declared in this scope
  for (std::set<int>::iterator it = set.begin(); it != set.end(); it++) {
                                    ^
1_858_3087_24115.cpp:26:36: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/detail/container_base_dispatch.hpp:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/assoc_container.hpp:48,
                 from 1_858_3087_24115.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:90:11: note:   'std::set'
     class set
           ^
1_858_3087_24115.cpp:27:3: error: 'rank' was not declared in this scope
   rank[*it] = total++;
   ^
1_858_3087_24115.cpp:27:3: note: suggested alternatives:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/move.h:57:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:59,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 1_858_3087_24115.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/type_traits:1340:12: note:   'std::rank'
     struct rank
            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/detail/type_utils.hpp:47:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/tag_and_trait.hpp:46,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/pb_ds/assoc_container.hpp:46,
                 from 1_858_3087_24115.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/tr1/type_traits:355:12: note:   'std::tr1::rank'
     struct rank
            ^
1_858_3087_24115.cpp:44:2: error: 'rbt' was not declared in this scope
  rbt tree;
  ^
1_858_3087_24115.cpp:45:6: error: missing template arguments before '.' token
  tree.insert(sequence[left]);
      ^
1_858_3087_24115.cpp:57:4: error: 'rbt' is not a class, namespace, or enumeration
    rbt::iterator it1 = tree.upper_bound(sequence[right] + top - 1),
    ^
1_858_3087_24115.cpp:61:8: error: 'it1' was not declared in this scope
    if (it1 == tree.end()) { pos1 = right - 1; }
        ^
1_858_3087_24115.cpp:61:19: error: missing template arguments before '.' token
    if (it1 == tree.end()) { pos1 = right - 1; }
                   ^
1_858_3087_24115.cpp:62:22: error: missing template arguments before '.' token
    else { pos1 = tree.order_of_key(*it1); }
                      ^
1_858_3087_24115.cpp:64:8: error: 'it2' was not declared in this scope
    if (it2 == tree.end()) { pos2 = right - 1; }
        ^
1_858_3087_24115.cpp:64:19: error: missing template arguments before '.' token
    if (it2 == tree.end()) { pos2 = right - 1; }
                   ^
1_858_3087_24115.cpp:65:22: error: missing template arguments before '.' token
    else { pos2 = tree.order_of_key(*it2); }
                      ^
1_858_3087_24115.cpp:68:8: error: missing template arguments before '.' token
    tree.insert(sequence[right]);
        ^
1_858_3087_24115.cpp:72:4: error: 'rbt' is not a class, namespace, or enumeration
    rbt::iterator td = tree.find(sequence[left]);
    ^
1_858_3087_24115.cpp:73:8: error: missing template arguments before '.' token
    tree.erase(td);
        ^
1_858_3087_24115.cpp:73:15: error: 'td' was not declared in this scope
    tree.erase(td);
               ^
1_858_3087_24115.cpp:75:4: error: 'rbt' is not a class, namespace, or enumeration
    rbt::iterator it1 = tree.lower_bound(sequence[left] - top),
    ^
1_858_3087_24115.cpp:79:8: error: 'it1' was not declared in this scope
    if (it1 == tree.end()) { pos1 = right; }
        ^
1_858_3087_24115.cpp:79:19: error: missing template arguments before '.' token
    if (it1 == tree.end()) { pos1 = right; }
                   ^
1_858_3087_24115.cpp:82:8: error: 'it2' was not declared in this scope
    if (it2 == tree.end()) { pos2 = right; }
        ^
1_858_3087_24115.cpp:82:19: error: missing template arguments before '.' token
    if (it2 == tree.end()) { pos2 = right; }
                   ^
1_858_3087_24115.cpp:83:22: error: missing template arguments before '.' token
    else { pos2 = tree.order_of_key(*it2); }
                      ^


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-06-29 12:07:45, Gzip enabled