Submission #64636


ソースコード

ステータス

項目 データ
問題 1436 - Simple Grid Problem
ユーザー名 ei1903
投稿日時 2020-11-07 15:42:31
言語 C++17
状態 Compile Error
得点 0
ソースコード長 3051 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:129:14: error: ‘std::tuple<long int, long int, long int> <structured bindings>’ has incomplete type
     for(auto [y, x, p] : point){
              ^~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:69,
                 from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/vector.tcc: In instantiation of ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {long int, long int, long int&}; _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >; std::vector<_Tp, _Alloc>::reference = std::tuple<long int, long int, long int>&]’:
./Main.cpp:122:39:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/vector.tcc:105:6: error: cannot increment a pointer to incomplete type ‘std::tuple<long int, long int, long int>’
      ++this->_M_impl._M_finish;
      ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/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 int, long int, long int>*; _Container = std::vector<std::tuple<long int, long int, long int> >]’:
./Main.cpp:129:26:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:803:2: error: cannot increment a pointer to incomplete type ‘std::tuple<long int, long int, long int>’
  ++_M_current;
  ^~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:64,
                 from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:395:15:   required from ‘std::vector<_Tp, _Alloc>::vector() [with _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >]’
./Main.cpp:117:35:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:286:35: error: invalid use of incomplete type ‘class std::tuple<long int, long int, long int>’
         _M_impl._M_end_of_storage - _M_impl._M_start);
         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘class std::tuple<long int, long int, long int>’
     class tuple;
           ^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:67,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/char_traits.h:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h: In substitution of ‘template<class _IteratorL, class _IteratorR, class _Container> decltype ((__lhs.base() - __rhs.base())) __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&) [with _IteratorL = std::tuple<long int, long int, long int>*; _IteratorR = std::tuple<long int, long int, long int>*; _Container = std::vector<std::tuple<long int, long int, long int> >]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:1969:22:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::tuple<long int, long int, long int>*, std::vector<std::tuple<long int, long int, long int> > >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:4834:18:   required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<std::tuple<long int, long int, long int>*, std::vector<std::tuple<long int, long int, long int> > >]’
./Main.cpp:125:36:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_iterator.h:953:30: error: invalid use of incomplete type ‘class std::tuple<long int, long int, long int>’
     -> decltype(__lhs.base() - __rhs.base())
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘class std::tuple<long int, long int, long int>’
     class tuple;
           ^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:62,
                 from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h: In instantiation of ‘void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::tuple<long int, long int, long int>*]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:206:15:   required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = std::tuple<long int, long int, long int>*; _Tp = std::tuple<long int, long int, long int>]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:567:15:   required from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >]’
./Main.cpp:117:35:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:133:21: error: static assertion failed: value type is destructible
       static_assert(is_destructible<_Value_type>::value,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_construct.h:137:11: error: invalid use of incomplete type ‘std::iterator_traits<std::tuple<long int, long int, long int>*>::value_type’ {aka ‘class std::tuple<long int, long int, long int>’}
       std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  __destroy(__first, __last);
  ~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘std::iterator_traits<std::tuple<long int, long int, long int>*>::value_type’ {aka ‘class std::tuple<long int, long int, long int>’}
     class tuple;
           ^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:46,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:41,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::tuple<long int, long int, long int>; _Args = {long int, long int, long int&}; _Tp = std::tuple<long int, long int, long int>]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/alloc_traits.h:475:4:   required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::tuple<long int, long int, long int>; _Args = {long int, long int, long int&}; _Tp = std::tuple<long int, long int, long int>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::tuple<long int, long int, long int> >]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/vector.tcc:103:30:   required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {long int, long int, long int&}; _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >; std::vector<_Tp, _Alloc>::reference = std::tuple<long int, long int, long int>&]’
./Main.cpp:122:39:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:136:4: error: invalid use of incomplete type ‘class std::tuple<long int, long int, long int>’
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:55,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/nested_exception.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/exception:144,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/type_traits:2410:11: note: declaration of ‘class std::tuple<long int, long int, long int>’
     class tuple;
           ^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/allocator.h:46,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:41,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::deallocate(__gnu_cxx::new_allocator<_Tp>::pointer, __gnu_cxx::new_allocator<_Tp>::size_type) [with _Tp = std::tuple<long int, long int, long int>; __gnu_cxx::new_allocator<_Tp>::pointer = std::tuple<long int, long int, long int>*; __gnu_cxx::new_allocator<_Tp>::size_type = long unsigned int]’:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/alloc_traits.h:462:9:   required from ‘static void std::allocator_traits<std::allocator<_CharT> >::deallocate(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, std::allocator_traits<std::allocator<_CharT> >::pointer, std::allocator_traits<std::allocator<_CharT> >::size_type) [with _Tp = std::tuple<long int, long int, long int>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::tuple<long int, long int, long int> >; std::allocator_traits<std::allocator<_CharT> >::pointer = std::tuple<long int, long int, long int>*; std::allocator_traits<std::allocator<_CharT> >::size_type = long unsigned int]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:304:19:   required from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(std::_Vector_base<_Tp, _Alloc>::pointer, std::size_t) [with _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >; std::_Vector_base<_Tp, _Alloc>::pointer = std::tuple<long int, long int, long int>*; std::size_t = long unsigned int]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:285:2:   required from ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >]’
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:395:15:   required from ‘std::vector<_Tp, _Alloc>::vector() [with _Tp = std::tuple<long int, long int, long int>; _Alloc = std::allocator<std::tuple<long int, long int, long int> >]’
./Main.cpp:117:35:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:119:6: error: invalid application of ‘__alignof__’ to incomplete type ‘std::tuple<long int, long int, long int>’
  if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
      ^~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:121:46: error: invalid application of ‘__alignof__’ to incomplete type ‘std::tuple<long int, long int, long int>’
      ::operator delete(__p, std::align_val_t(alignof(_Tp)));
                                              ^~~~~~~~~~~~

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #