Submission #00113
ソースコード
ステータス
項目 |
データ |
問題 |
0005 - πくんのもんだい |
ユーザー名 |
サウンド
|
投稿日時 |
2017-07-14 17:22:36 |
言語 |
C++11 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
1385 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp:11:10: エラー: ISO C++ では型の無い ‘Node_h’ の宣言を禁止しています [-fpermissive]
Node_h(){}
^
./Main.cpp:12:43: エラー: ISO C++ では型の無い ‘Node_h’ の宣言を禁止しています [-fpermissive]
Node_h(int to, int hiro, int t, int cost) : to(to), hiro(hiro), t(t), cost(cost) {}
^
./Main.cpp: メンバ関数 ‘int Node::Node_h(int, int, int, int)’ 内:
./Main.cpp:12:47: エラー: only constructors take member initializers
Node_h(int to, int hiro, int t, int cost) : to(to), hiro(hiro), t(t), cost(cost) {}
^~
./Main.cpp: 関数 ‘int main()’ 内:
./Main.cpp:31:5: エラー: ‘node_h’ was not declared in this scope
node_h[a].push_back(Node_h(b, c, t, 0));
^~~~~~
./Main.cpp:31:5: 備考: suggested alternative: ‘node’
node_h[a].push_back(Node_h(b, c, t, 0));
^~~~~~
node
./Main.cpp:31:25: エラー: ‘Node_h’ was not declared in this scope
node_h[a].push_back(Node_h(b, c, t, 0));
^~~~~~
./Main.cpp:31:25: 備考: suggested alternative: ‘Node’
node_h[a].push_back(Node_h(b, c, t, 0));
^~~~~~
Node
./Main.cpp:42:20: エラー: ‘Node_h’ was not declared in this scope
priority_queue<Node_h> que;
^~~~~~
./Main.cpp:42:20: 備考: suggested alternative: ‘Node’
priority_queue<Node_h> que;
^~~~~~
Node
./Main.cpp:42:26: エラー: template argument 1 is invalid
priority_queue<Node_h> que;
^
./Main.cpp:42:26: エラー: template argument 2 is invalid
./Main.cpp:42:26: エラー: template argument 3 is invalid
./Main.cpp:43:9: エラー: request for member ‘push’ in ‘que’, which is of non-class type ‘int’
que.push( Node_h(s, 0, 0, 0) );
^~~~
./Main.cpp:45:16: エラー: request for member ‘empty’ in ‘que’, which is of non-class type ‘int’
while(!que.empty()) {
^~~~~
./Main.cpp:47:14: エラー: expected ‘;’ before ‘q’
Node_h q = que.top(); que.pop();
^
./Main.cpp:47:33: エラー: request for member ‘pop’ in ‘que’, which is of non-class type ‘int’
Node_h q = que.top(); que.pop();
^~~
./Main.cpp:49:10: エラー: ‘q’ was not declared in this scope
if(q.to == g) {
^
./Main.cpp:50:16: エラー: ‘cost’ was not declared in this scope
cout<< cost <<endl;
^~~~
./Main.cpp:50:16: 備考: suggested alternative: ‘cosl’
cout<< cost <<endl;
^~~~
cosl
./Main.cpp:54:15: エラー: ‘q’ was not declared in this scope
if(done[q.to]) continue;
^
./Main.cpp:55:12: エラー: ‘q’ was not declared in this scope
done[q.to] = true;
^
./Main.cpp:59:13: エラー: request for member ‘push’ in ‘que’, which is of non-class type ‘int’
que.push( Node_h(node[q.to][j].to,
^~~~
セット
テストケース