QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#696708#7906. Almost Convexucup-team1277Compile Error//C++173.4kb2024-11-01 00:40:542024-11-01 00:40:55

詳細信息

In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/c++allocator.h:33,
                 from /usr/include/c++/13/bits/allocator.h:46,
                 from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from answer.code:1:
/usr/include/c++/13/bits/new_allocator.h: In instantiation of ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Point; _Args = {long long int&, long long int&}; _Tp = Point]’:
/usr/include/c++/13/bits/alloc_traits.h:537:17:   required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = Point; _Args = {long long int&, long long int&}; _Tp = Point; allocator_type = std::allocator<Point>]’
/usr/include/c++/13/bits/vector.tcc:117:30:   required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {long long int&, long long int&}; _Tp = Point; _Alloc = std::allocator<Point>; reference = Point&]’
answer.code:99:53:   required from here
/usr/include/c++/13/bits/new_allocator.h:187:11: error: new initializer expression list treated as compound expression [-fpermissive]
  187 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/new_allocator.h:187:11: error: no matching function for call to ‘Point::Point(long long int&)’
answer.code:5:8: note: candidate: ‘Point::Point()’
    5 | struct Point {int x, y;};
      |        ^~~~~
answer.code:5:8: note:   candidate expects 0 arguments, 1 provided
answer.code:5:8: note: candidate: ‘constexpr Point::Point(const Point&)’
answer.code:5:8: note:   no known conversion for argument 1 from ‘long long int’ to ‘const Point&’
answer.code:5:8: note: candidate: ‘constexpr Point::Point(Point&&)’
answer.code:5:8: note:   no known conversion for argument 1 from ‘long long int’ to ‘Point&&’