Submission #00249
ソースコード
ステータス
項目 |
データ |
問題 |
0005 - スニーカーマン |
ユーザー名 |
eiya
|
投稿日時 |
2017-01-29 21:51:07 |
言語 |
C++11 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
4041 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘void Dijkstra(uint32_t)’:
./Main.cpp:55: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:3:
/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:55:61: error: template argument 3 is invalid
std::priority_queue<P, std::vector<P>, std::greater<>> que;
^
./Main.cpp:59:13: error: request for member ‘emplace’ in ‘que’, which is of non-class type ‘int’
que.emplace(0, s);
^
./Main.cpp:60:21: error: request for member ‘empty’ in ‘que’, which is of non-class type ‘int’
while (!que.empty())
^
./Main.cpp:62:30: error: request for member ‘top’ in ‘que’, which is of non-class type ‘int’
auto p = que.top(); que.pop();
^
./Main.cpp:62:41: error: request for member ‘pop’ in ‘que’, which is of non-class type ‘int’
auto p = que.top(); que.pop();
^
./Main.cpp:81:37: error: request for member ‘emplace’ in ‘que’, which is of non-class type ‘int’
que.emplace(cost, e.to);
^
セット
テストケース