Borderou de evaluare (job #2296697)
Utilizator | Data | 4 decembrie 2018 22:30:54 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'std::vector<int> dijkstra(int&, std::vector<std::vector<Node> >&)':
main.cpp:53:25: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
q.push(Node(start, 0));
^
main.cpp:25:5: note: initializing argument 2 of 'Node::Node(int&, int&)'
Node(int &n, int &c)
^~~~
main.cpp: In function 'int main()':
main.cpp:96:40: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
vector <int> ans = dijkstra(1, path);
^
main.cpp:45:14: note: initializing argument 1 of 'std::vector<int> dijkstra(int&, std::vector<std::vector<Node> >&)'
vector <int> dijkstra(int &start, vector <vector <Node>> &path)
^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !