/ Vijos /

记录详情

Compile Error

In file included from /usr/include/c++/6/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1882:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1968:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long long int]'
/in/foo.cc:20:16:   required from here
/usr/include/c++/6/bits/stl_algo.h:1847:3: error: no type named 'value_type' in 'struct std::iterator_traits<long long int>'
   __val = _GLIBCXX_MOVE(*__i);
   ^~~~~
/usr/include/c++/6/bits/stl_algo.h:1849:8: error: invalid type argument of unary '*' (have 'long long int')
        *__first = _GLIBCXX_MOVE(__val);
        ^~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1847:3: error: no type named 'value_type' in 'struct std::iterator_traits<long long int>'
   __val = _GLIBCXX_MOVE(*__i);
   ^~~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = long long int; _Iterator2 = long long int]':
/usr/include/c++/6/bits/stl_algo.h:1844:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1882:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1968:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long long int]'
/in/foo.cc:20:16:   required from here
/usr/include/c++/6/bits/predefined_ops.h:43:16: error: invalid type argument of unary '*' (have 'long long int')
       { return *__it1 < *__it2; }
                ^~~~~~
/usr/include/c++/6/bits/predefined_ops.h:43:25: error: invalid type argument of unary '*' (have 'long long int')
       { return *__it1 < *__it2; }
                         ^~~~~~
In file included from /usr/include/c++/6/bits/stl_algo.h:61:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1669:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1930:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1945:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = long long int; _Size = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1965:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long long int]'
/in/foo.cc:20:16:   required from here
/usr/include/c++/6/bits/stl_heap.h:323:4: error: no type named 'value_type' in 'struct std::iterator_traits<long long int>'
    _ValueType;
    ^~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:325:4: error: no type named 'difference_type' in 'struct std::iterator_traits<long long int>'
    _DistanceType;
    ^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1672:19:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1930:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1945:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = long long int; _Size = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1965:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long long int]'
/in/foo.cc:20:16:   required from here
/usr/include/c++/6/bits/stl_heap.h:241:2: error: no type named 'value_type' in 'struct std::iterator_traits<long long int>'
  _ValueType;
  ^~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:243:2: error: no type named 'difference_type' in 'struct std::iterator_traits<long long int>'
  _DistanceType;
  ^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:246:7: error: invalid type argument of unary '*' (have 'long long int')
       *__result = _GLIBCXX_MOVE(*__first);
       ^~~~~~~~~
In file included from /usr/include/c++/6/bits/nested_exception.h:40:0,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_heap.h:246:19: error: invalid type argument of unary '*' (have 'long long int')
       *__result = _GLIBCXX_MOVE(*__first);
                   ^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include

信息

递交者
类型
自测
题目
P1779 国王游戏
语言
C++
递交时间
2024-10-15 19:28:08
评测时间
2024-10-15 19:28:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes