Borderou de evaluare (job #3189024)

Utilizator arobyRobert Acsente aroby Data 4 ianuarie 2024 13:24:18
Problema Paznici Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'bool Graph::BFS(int, int, std::vector<int>&)': main.cpp:30:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 30 | for (int ind = 0; ind < graph[u].size(); ind++) { | ~~~~^~~~~~~~~~~~~~~~~ main.cpp: In member function 'int Graph::FordFulkerson(int, int)': main.cpp:50:29: error: 'INT_MAX' was not declared in this scope 50 | int path_flow = INT_MAX; | ^~~~~~~ main.cpp:8:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? 7 | #include <fstream> +++ |+#include <climits> 8 | using namespace std; main.cpp: In function 'void dfs(int, std::map<int, bool>&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, Graph&)': main.cpp:73:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 73 | for (int i = 0; i < adj[nod].size(); i++) { | ~~^~~~~~~~~~~~~~~~~ main.cpp:75:57: error: 'std::vector<std::vector<int> > Graph::graph' is private within this context 75 | if (vis[vec] == false && og_graph[nod][vec] - g.graph[nod][vec] != 0) { | ^~~~~ main.cpp:12:25: note: declared private here 12 | vector<vector<int>> graph; | ^~~~~ main.cpp: In function 'int main()': main.cpp:118:17: error: invalid initialization of reference of type 'std::vector<std::vector<int> >&' from expression of type 'std::map<int, std::vector<int> >' 118 | dfs(0, vis, adj, og_graph, g); | ^~~ main.cpp:71:61: note: in passing argument 3 of 'void dfs(int, std::map<int, bool>&, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, Graph&)' 71 | void dfs(int nod, map<int, bool>& vis, vector<vector<int>>& adj, vector<vector<int>>& og_graph, Graph& g) { | ~~~~~~~~~~~~~~~~~~~~~^~~ main.cpp:115:9: warning: unused variable 'ok' [-Wunused-variable] 115 | int ok = g.FordFulkerson(0, n + m + 1); | ^~ Non zero exit status: 1

Ceva nu functioneaza?