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_37816517_279.cpp: In function 'std::set<Node>::iterator split(int)':
0_0_37816517_279.cpp:73:10: error: expected unqualified-id before '[' token
     auto [l, r, v] = *it;
          ^
0_0_37816517_279.cpp:75:17: error: 'l' was not declared in this scope
     odt.insert({l, x - 1, v});
                 ^
0_0_37816517_279.cpp:75:27: error: 'v' was not declared in this scope
     odt.insert({l, x - 1, v});
                           ^
0_0_37816517_279.cpp:75:29: error: no matching function for call to 'std::set<Node>::insert(<brace-enclosed initializer list>)'
     odt.insert({l, x - 1, v});
                             ^
0_0_37816517_279.cpp:75:29: note: candidates are:
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++/x86_64-w64-mingw32/bits/stdc++.h:86,
                 from 0_0_37816517_279.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const Node&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node>::value_type&& {aka Node&&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(const_iterator __position, const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(const_iterator __position, value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note: template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>]
  insert(_InputIterator __first, _InputIterator __last)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note:   template argument deduction/substitution failed:
0_0_37816517_279.cpp:75:29: note:   candidate expects 2 arguments, 1 provided
     odt.insert({l, x - 1, v});
                             ^
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++/x86_64-w64-mingw32/bits/stdc++.h:86,
                 from 0_0_37816517_279.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:568:7: note: void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>]
       insert(initializer_list<value_type> __l)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:568:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<Node>'
0_0_37816517_279.cpp:76:27: error: 'r' was not declared in this scope
     return odt.insert({x, r, v}).first;
                           ^
0_0_37816517_279.cpp:76:32: error: no matching function for call to 'std::set<Node>::insert(<brace-enclosed initializer list>)'
     return odt.insert({x, r, v}).first;
                                ^
0_0_37816517_279.cpp:76:32: note: candidates are:
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++/x86_64-w64-mingw32/bits/stdc++.h:86,
                 from 0_0_37816517_279.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const Node&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node>::value_type&& {aka Node&&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(const_iterator __position, const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Node>; std::set<_Key, _Compare, _Alloc>::value_type = Node]
       insert(const_iterator __position, value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note: template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = Node; _Compare = std::less<Node>; _Alloc = std::allocator<Node>]
  insert(_InputIterator __first, _InputIterator __last)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note:   template argument deduction/substitution fail


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.015600(s) query 1, Server time : 2024-07-05 12:15:42, Gzip enabled