Borderou de evaluare (job #2801123)
Utilizator | Data | 14 noiembrie 2021 23:52:14 | |
---|---|---|---|
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 'void GrafCosturi::Djisktra(int)':
main.cpp:58:5: error: 'memset' was not declared in this scope
58 | memset(distante, INF, sizeof distante);
| ^~~~~~
main.cpp:8:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
7 | #include <set>
+++ |+#include <cstring>
8 | # define INF 0x3f3f3f3f
main.cpp:64:13: warning: unused variable 'd' [-Wunused-variable]
64 | int d = cost_minim.begin()->first;
| ^
main.cpp: In function 'bool HavelHakimi()':
main.cpp:232:40: error: expression cannot be used as a function
232 | if (grad < 0) return false(); //daca exista grade negative, nu se paote forma un graf
| ^
main.cpp:235:9: error: 'sort' was not declared in this scope; did you mean 'qsort'?
235 | sort(grade.begin(), grade.end(), greater<int>());
| ^~~~
| qsort
main.cpp:238:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
238 | if (max > grade.size()) //daca cel mai mare grad e mai mare decat nr de elemnte din lista, at false
| ~~~~^~~~~~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:250:15: warning: unused variable 'S' [-Wunused-variable]
250 | int N, M, S, x, y, z;
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !