Borderou de evaluare (job #2802204)

Utilizator dascalu_maraDascalu Mara Elena dascalu_mara Data 17 noiembrie 2021 19:05:58
Problema Algoritmul Bellman-Ford Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'void Graph::DFS(int)': main.cpp:171:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 171 | for (int i = 0; i < adj[node].size(); i++) | ~~^~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graph::afis_adj(int)': main.cpp:177:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 177 | for (int i = 0; i < adj[node].size(); i++) | ~~^~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graph::BFS(int)': main.cpp:247:5: error: 'memset' was not declared in this scope 247 | memset(cost, -1, sizeof(cost)); | ^~~~~~ main.cpp:17:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'? 16 | #include <set> +++ |+#include <cstring> 17 | #include <tuple> main.cpp:257:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 257 | for (int i = 0; i < adj[node].size(); i++) //parcurg toti vecinii sai | ~~^~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graph::calculateIndegree(int*)': main.cpp:375:5: error: 'memset' was not declared in this scope 375 | memset(indegree, 0, no_nodes); | ^~~~~~ main.cpp:375:5: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'? main.cpp: In member function 'void Graph::topSort(int*, std::queue<int>)': main.cpp:399:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 399 | for (int i = 0; i < adj[node].size(); i++) | ~~^~~~~~~~~~~~~~~~~~ main.cpp: In member function 'bool Graph::graphExists(std::vector<int>)': main.cpp:422:9: error: 'sort' was not declared in this scope; did you mean 'qsort'? 422 | sort(degree_seq.begin(), degree_seq.end(), greater<>()); | ^~~~ | qsort main.cpp:430:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 430 | if (top > degree_seq.size()) // daca valoarea primului element este mare decat numarul de elemente ramase, nu putem construi un astfel de graf | ~~~~^~~~~~~~~~~~~~~~~~~ main.cpp:433:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 433 | for (int i = 0 ; i < degree_seq.size(); i++) //dupa eliminarea primului element, scadem gradul "nodurilor" ramase | ~~^~~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graph::Dijkstra()': main.cpp:19:13: error: 'INT_MAX' was not declared in this scope 19 | #define INF INT_MAX | ^~~~~~~ main.cpp:565:19: note: in expansion of macro 'INF' 565 | dist[i] = INF; | ^~~ main.cpp:17:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? 16 | #include <set> +++ |+#include <climits> 17 | #include <tuple> Non zero exit status: 1

Ceva nu functioneaza?