Borderou de evaluare (job #3131398)
Utilizator | Data | 19 mai 2023 23:34:25 | |
---|---|---|---|
Problema | Camionas | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int bfs(int)':
main.cpp:12:23: error: 'malloc' was not declared in this scope
12 | int *dist = (int*)malloc(g.size() * sizeof(int));
| ^~~~~~
main.cpp:6:1: note: 'malloc' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
5 | #include <utility>
+++ |+#include <cstdlib>
6 |
main.cpp:13:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
13 | for(int i=0;i<g.size();++i){
| ~^~~~~~~~~
main.cpp:23:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for(int i=0;i<g[k].size();++i){
| ~^~~~~~~~~~~~
main.cpp:32:5: error: 'free' was not declared in this scope
32 | free(dist);
| ^~~~
main.cpp:32:5: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !