0_0_36591185_22290.cpp:4:1: error: expected ',' or ';' before 'int'
int ans[N];
^
0_0_36591185_22290.cpp: In function 'void init()':
0_0_36591185_22290.cpp:14:9: error: 'ans' was not declared in this scope
ans[i]=INT_MAX;
^
0_0_36591185_22290.cpp: In function 'void DJS(int)':
0_0_36591185_22290.cpp:40:5: error: 'ans' was not declared in this scope
ans[x]=0;
^
0_0_36591185_22290.cpp:48:52: error: no matching function for call to 'std::priority_queue<Node, std::vector<Node>, cmp>::push(<brace-enclosed initializer list>)'
q.push({ans[edge[i].to],edge[i].to});
^
0_0_36591185_22290.cpp:48:52: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:85,
from 0_0_36591185_22290.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:499:7: note: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = Node; _Sequence = std::vector<Node>; _Compare = cmp; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = Node]
push(const value_type& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:499:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const Node&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:507:7: note: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = Node; _Sequence = std::vector<Node>; _Compare = cmp; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = Node]
push(value_type&& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:507:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<Node, std::vector<Node>, cmp>::value_type&& {aka Node&&}'
0_0_36591185_22290.cpp: In function 'int main()':
0_0_36591185_22290.cpp:71:13: error: 'ans' was not declared in this scope
if (ans[n] == INT_MAX) cout << -1 << endl;
^
|