Borderou de evaluare (job #2889445)
| Utilizator | Data | 12 aprilie 2022 19:38:48 | |
|---|---|---|---|
| Problema | Algoritmul lui Dijkstra | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'bool ComparaDistante::operator()(int, int)':
main.cpp:19:10: error: 'D' was not declared in this scope
19 | return D[x] > D[y];
| ^
main.cpp: In function 'void Dijkstra(int)':
main.cpp:5:22: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow]
5 | #define oo (1 << 31) - 1
| ~~~~~~~~~~^~~
main.cpp:31:10: note: in expansion of macro 'oo'
31 | D[i] = oo;
| ^~
main.cpp: In function 'void Citire()':
main.cpp:61:9: warning: unused variable 'j' [-Wunused-variable]
61 | int i, j, x, y, w;
| ^
main.cpp: In function 'void Afisare()':
main.cpp:5:22: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow]
5 | #define oo (1 << 31) - 1
| ~~~~~~~~~~^~~
main.cpp:73:15: note: in expansion of macro 'oo'
73 | if (D[i] != oo)
| ^~
In file included from /usr/include/c++/10/queue:64,
from main.cpp:3:
/usr/include/c++/10/bits/stl_queue.h: In instantiation of 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = int; _Sequence = std::queue<int>; _Compare = ComparaDistante; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = int]':
main.cpp:33:21: required from here
/usr/include/c++/10/bits/stl_queue.h:642:4: error: 'class std::queue<int>' has no member named 'push_back'
642 | c.push_back(__x);
| ~~^~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:643:19: error: 'class std::queue<int>' has no member named 'begin'
643 | std::push_heap(c.begin(), c.end(), comp);
| ~~^~~~~
/usr/include/c++/10/bits/stl_queue.h:643:30: error: 'class std::queue<int>' has no member named 'end'
643 | std::push_heap(c.begin(), c.end(), comp);
| ~~^~~
/usr/include/c++/10/bits/stl_queue.h: In instantiation of 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = int; _Sequence = std::queue<int>; _Compare = ComparaDistante]':
main.cpp:38:13: required from here
/usr/include/c++/10/bits/stl_queue.h:678:18: error: 'class std::queue<int>' has no member named 'begin'
678 | std::pop_heap(c.begin(), c.end(), comp);
| ~~^~~~~
/usr/include/c++/10/bits/stl_queue.h:678:29: error: 'class std::queue<int>' has no member named 'end'
678 | std::pop_heap(c.begin(), c.end(), comp);
| ~~^~~
/usr/include/c++/10/bits/stl_queue.h:679:4: error: 'class std::queue<int>' has no member named 'pop_back'
679 | c.pop_back();
| ~~^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
