Borderou de evaluare (job #2693853)
Utilizator | Data | 7 ianuarie 2021 12:00:23 | |
---|---|---|---|
Problema | Dragon Ball Z | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'int Graph::findLowestCycleContainingSource() const':
main.cpp:71:21: error: expected unqualified-id before '[' token
auto[neighbourIndex, edgeCost] = edge;
^
main.cpp:72:41: error: 'neighbourIndex' was not declared in this scope
auto neighbour = &nodes[neighbourIndex];
^~~~~~~~~~~~~~
main.cpp:82:115: error: 'edgeCost' was not declared in this scope
lowestCycleCost = min(lowestCycleCost, node->distanceFromSource + neighbour->distanceFromSource + edgeCost);
^~~~~~~~
main.cpp:70:24: warning: unused variable 'edge' [-Wunused-variable]
for (auto &edge : nodes[i].Edges) {
^~~~
main.cpp: In member function 'void Graph::dijkstraNodeProcess(GraphNode*)':
main.cpp:98:17: error: expected unqualified-id before '[' token
auto[neighbourIndex, edgeCost] = edge;
^
main.cpp:99:37: error: 'neighbourIndex' was not declared in this scope
auto neighbour = &nodes[neighbourIndex];
^~~~~~~~~~~~~~
main.cpp:107:76: error: 'edgeCost' was not declared in this scope
if (neighbour->distanceFromSource > node->distanceFromSource + edgeCost) {
^~~~~~~~
main.cpp:112:81: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<void> >::push(<brace-enclosed initializer list>)'
targetNodes.push({neighbour->distanceFromSource, neighbourIndex});
^
In file included from /usr/include/c++/6/queue:64:0,
from main.cpp:6:
/usr/include/c++/6/bits/stl_queue.h:558:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<void>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(const value_type& __x)
^~~~
/usr/include/c++/6/bits/stl_queue.h:558:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
/usr/include/c++/6/bits/stl_queue.h:566:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<void>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(value_type&& __x)
^~~~
/usr/include/c++/6/bits/stl_queue.h:566:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<void> >::value_type&& {aka std::pair<int, int>&&}'
main.cpp:97:20: warning: unused variable 'edge' [-Wunused-variable]
for (auto &edge : node->Edges) {
^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !