QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#112104#4742. PrawnicyHuangHanShengCompile Error//C++171.1kb2023-06-10 03:10:112023-06-10 03:10:13

詳細信息

answer.code: In function ‘long long int pode(long long int)’:
answer.code:20:18: error: ‘std::tuple<long long int, long long int, long long int> <structured bindings>’ has incomplete type
   20 |         for (auto[l, r, idx] : v)
      |                  ^~~~~~~~~~~
answer.code: In function ‘int32_t main()’:
answer.code:37:28: error: no matching function for call to ‘std::vector<std::tuple<long long int, long long int, long long int> >::push_back(<brace-enclosed initializer list>)’
   37 |                 v.push_back({a, b, i});
      |                 ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
                 from /usr/include/c++/11/queue:61,
                 from answer.code:3:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::tuple<long long int, long long int, long long int>; _Alloc = std::allocator<std::tuple<long long int, long long int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<long long int, long long int, long long int>]’
 1187 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:35: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type&’ {aka ‘const std::tuple<long long int, long long int, long long int>&’}
 1187 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::tuple<long long int, long long int, long long int>; _Alloc = std::allocator<std::tuple<long long int, long long int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<long long int, long long int, long long int>]’
 1203 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1203:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::tuple<long long int, long long int, long long int> >::value_type&&’ {aka ‘std::tuple<long long int, long long int, long long int>&&’}
 1203 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
answer.code:40:9: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
   40 |         sort(all(v));
      |         ^~~~
      |         short
answer.code:54:18: error: ‘std::tuple<long long int, long long int, long long int> <structured bindings>’ has incomplete type
   54 |         for (auto[l, r, idx] : v)
      |                  ^~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
                 from /usr/include/c++/11/queue:61,
                 from answer.code:3:
/usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<long long int, long long int, long long int>; _Alloc = std::allocator<std::tuple<long long int, long long int, long long int> >]’:
/usr/include/c++/11/bits/stl_vector.h:487:7:   required from here
/usr/include/c++/11/bits/stl_vector.h:336:49: error: invalid use of incomplete type ‘class std::tuple<long long int, long long int, long long int>’
  336 |                       _M_impl._M_end_of_storage - _M_impl._M_start);
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/nested_exception.h:40,
                 from /usr/include/c++/11/exception:148,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:2:
/usr/include/c++/11/type_traits:2591:11: note: declaration of ‘class std::tuple<long long int, long long int, long long int>’
 2591 |     class tuple;
      |           ^~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:2:
/usr/include/c++/11/bits/stl_iterator.h: In instantiation of ‘__gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++() [with _Iterator = std::tuple<long long int, long long int, long long int>*; _Container = std::vector<std::tuple<long long int, long long int, long long int> >]’:
answer.code:20:25:   required from here
/usr/include/c++/11/bits/stl_iterator.h:1034:11: error: cannot increment a pointer to incomplete type ‘std::tuple<long long int, long long int, long long int>’
 1034 |         ++_M_current;
      |           ^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/c+...