Submission #00242


ソースコード

ステータス

項目 データ
問題 0005 - スニーカーマン
ユーザー名 eiya
投稿日時 2017-01-29 21:48:57
言語 C++11
状態 Compile Error
得点 0
ソースコード長 12779 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘void Dijkstra(uint32_t)’:
./Main.cpp:56:60: error: wrong number of template arguments (0, should be 1)
         std::priority_queue<P, std::vector<P>, std::greater<>> que;
                                                            ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/string:48:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/locale_classes.h:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/ios_base.h:41,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:42,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
                 from ./Main.cpp:4:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_function.h:372:12: note: provided for ‘template<class _Tp> struct std::greater’
     struct greater : public binary_function<_Tp, _Tp, bool>
            ^
./Main.cpp:56:61: error: template argument 3 is invalid
         std::priority_queue<P, std::vector<P>, std::greater<>> que;
                                                             ^
./Main.cpp:60:13: error: request for member ‘emplace’ in ‘que’, which is of non-class type ‘int’
         que.emplace(0, s);
             ^
./Main.cpp:61:21: error: request for member ‘empty’ in ‘que’, which is of non-class type ‘int’
         while (!que.empty())
                     ^
./Main.cpp:63:30: error: request for member ‘top’ in ‘que’, which is of non-class type ‘int’
                 auto p = que.top(); que.pop();
                              ^
./Main.cpp:63:41: error: request for member ‘pop’ in ‘que’, which is of non-class type ‘int’
                 auto p = que.top(); que.pop();
                                         ^
./Main.cpp:82:37: error: request for member ‘emplace’ in ‘que’, which is of non-class type ‘int’
                                 que.emplace(cost, e.to);
                                     ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:143:39: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
         std::sort(pass, pass_iter, [](auto& lpass, auto& rpass) {
                                       ^
./Main.cpp:143:52: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
         std::sort(pass, pass_iter, [](auto& lpass, auto& rpass) {
                                                    ^
./Main.cpp: In lambda function:
./Main.cpp:144:54: error: request for member ‘begin’ in ‘lpass’, which is of non-class type ‘int’
                 auto l_iter = std::find_if_not(lpass.begin(), lpass.end(), [](int32_t v) {return v < 0; });
                                                      ^
./Main.cpp:144:69: error: request for member ‘end’ in ‘lpass’, which is of non-class type ‘int’
                 auto l_iter = std::find_if_not(lpass.begin(), lpass.end(), [](int32_t v) {return v < 0; });
                                                                     ^
./Main.cpp:145:54: error: request for member ‘begin’ in ‘rpass’, which is of non-class type ‘int’
                 auto r_iter = std::find_if_not(rpass.begin(), rpass.end(), [](int32_t v) {return v < 0; });
                                                      ^
./Main.cpp:145:69: error: request for member ‘end’ in ‘rpass’, which is of non-class type ‘int’
                 auto r_iter = std::find_if_not(rpass.begin(), rpass.end(), [](int32_t v) {return v < 0; });
                                                                     ^
./Main.cpp:146:39: error: request for member ‘end’ in ‘lpass’, which is of non-class type ‘int’
                 while(l_iter != lpass.end() && r_iter != rpass.end())
                                       ^
./Main.cpp:146:64: error: request for member ‘end’ in ‘rpass’, which is of non-class type ‘int’
                 while(l_iter != lpass.end() && r_iter != rpass.end())
                                                                ^
./Main.cpp:152:41: error: request for member ‘end’ in ‘rpass’, which is of non-class type ‘int’
                 return (r_iter != rpass.end());
                                         ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:71:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
                 from ./Main.cpp:4:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = std::array<int, 1000ul>*; _Iterator2 = std::array<int, 1000ul>*; _Compare = main()::<lambda(int&, int&)>]’:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1842:14:   required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1880:25:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1966:31:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:4729:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::array<int, 1000ul>*; _Compare = main()::<lambda(int&, int&)>]’
./Main.cpp:153:10:   required from here
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:123:46: error: no match for call to ‘(main()::<lambda(int&, int&)>) (std::array<int, 1000ul>&, std::array<int, 1000ul>&)’
         { return bool(_M_comp(*__it1, *__it2)); }
                                              ^
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:123:46: note: candidate: bool (*)(int&, int&) <conversion>
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:123:46: note:   candidate expects 3 arguments, 3 provided
./Main.cpp:143:63: note: candidate: main()::<lambda(int&, int&)>
         std::sort(pass, pass_iter, [](auto& lpass, auto& rpass) {
                                                               ^
./Main.cpp:143:63: note:   no known conversion for argument 1 from ‘std::array<int, 1000ul>’ to ‘int&’
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:71:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
                 from ./Main.cpp:4:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::array<int, 1000ul>; _Iterator = std::array<int, 1000ul>*; _Compare = main()::<lambda(int&, int&)>]’:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1823:20:   required from ‘void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1850:36:   required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1880:25:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1966:31:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:4729:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::array<int, 1000ul>*; _Compare = main()::<lambda(int&, int&)>]’
./Main.cpp:153:10:   required from here
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:169:37: error: no match for call to ‘(main()::<lambda(int&, int&)>) (std::array<int, 1000ul>&, std::array<int, 1000ul>&)’
  { return bool(_M_comp(__val, *__it)); }
                                     ^
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:169:37: note: candidate: bool (*)(int&, int&) <conversion>
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:169:37: note:   candidate expects 3 arguments, 3 provided
./Main.cpp:143:63: note: candidate: main()::<lambda(int&, int&)>
         std::sort(pass, pass_iter, [](auto& lpass, auto& rpass) {
                                                               ^
./Main.cpp:143:63: note:   no known conversion for argument 1 from ‘std::array<int, 1000ul>’ to ‘int&’
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:71:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
                 from ./Main.cpp:4:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = std::array<int, 1000ul>*; _Value = std::array<int, 1000ul>; _Compare = main()::<lambda(int&, int&)>]’:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_heap.h:129:48:   required from ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Distance = long int; _Tp = std::array<int, 1000ul>; _Compare = __gnu_cxx::__ops::_Iter_comp_val<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_heap.h:228:23:   required from ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Distance = long int; _Tp = std::array<int, 1000ul>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_heap.h:333:22:   required from ‘void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1669:23:   required from ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1928:25:   required from ‘void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1943:27:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:1963:25:   required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::array<int, 1000ul>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(int&, int&)> >]’
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algo.h:4729:18:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = std::array<int, 1000ul>*; _Compare = main()::<lambda(int&, int&)>]’
./Main.cpp:153:10:   required from here
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:144:37: error: no match for call to ‘(main()::<lambda(int&, int&)>) (std::array<int, 1000ul>&, std::array<int, 1000ul>&)’
  { return bool(_M_comp(*__it, __val)); }
                                     ^
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:144:37: note: candidate: bool (*)(int&, int&) <conversion>
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/predefined_ops.h:144:37: note:   candidate expects 3 arguments, 3 provided
./Main.cpp:143:63: note: candidate: main()::<lambda(int&, int&)>
         std::sort(pass, pass_iter, [](auto& lpass, auto& rpass) {
                                                               ^
./Main.cpp:143:63: note:   no known conversion for argument 1 from ‘std::array<int, 1000ul>’ to ‘int&’

セット

セット 得点 Cases

テストケース

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