Submission #85945


ソースコード

ステータス

項目 データ
問題 1814 - 最長経路問題
ユーザー名 horen
投稿日時 2025-08-01 17:03:40
言語 C++17
状態 Compile Error
得点 0
ソースコード長 1371 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

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/istream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
                 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 = Edge; _Args = {int&, int&}; _Tp = Edge]’:
/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 = Edge; _Args = {int&, int&}; _Tp = Edge; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<Edge>]’
/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 = {int&, int&}; _Tp = Edge; _Alloc = std::allocator<Edge>; std::vector<_Tp, _Alloc>::reference = Edge&]’
./Main.cpp:26:34:   required from here
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:136:4: error: new initializer expression list treated as compound expression [-fpermissive]
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/ext/new_allocator.h:136:4: error: no matching function for call to ‘Edge::Edge(int&)’
./Main.cpp:14:8: note: candidate: ‘Edge::Edge()’
 struct Edge{ int to,c; };
        ^~~~
./Main.cpp:14:8: note:   candidate expects 0 arguments, 1 provided
./Main.cpp:14:8: note: candidate: ‘constexpr Edge::Edge(const Edge&)’
./Main.cpp:14:8: note:   no known conversion for argument 1 from ‘int’ to ‘const Edge&’
./Main.cpp:14:8: note: candidate: ‘constexpr Edge::Edge(Edge&&)’
./Main.cpp:14:8: note:   no known conversion for argument 1 from ‘int’ to ‘Edge&&’

セット

セット 得点 Cases

テストケース

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