Borderou de evaluare (job #2905059)

Utilizator puica2018Puica Andrei puica2018 Data 19 mai 2022 10:52:19
Problema Flux maxim de cost minim Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'bool Graph::Dijkstra(int, int, std::vector<int>, std::vector<int>, std::vector<int>&)': main.cpp:43:77: error: wrong number of template arguments (2, should be at least 0) 43 | priority_queue <pair <int,int>,vector <pair <int,int>>,greater <int,int>> pq; | ^~~ In file included from /usr/include/c++/10/string:48, from /usr/include/c++/10/bits/locale_classes.h:40, from /usr/include/c++/10/bits/ios_base.h:41, from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from main.cpp:1: /usr/include/c++/10/bits/stl_function.h:337:12: note: provided for 'template<class _Tp> struct std::greater' 337 | struct greater; | ^~~~~~~ main.cpp:43:80: error: template argument 3 is invalid 43 | priority_queue <pair <int,int>,vector <pair <int,int>>,greater <int,int>> pq; | ^~ main.cpp:46:12: error: request for member 'push' in 'pq', which is of non-class type 'int' 46 | pq.push(0,source); | ^~~~ main.cpp:47:19: error: request for member 'empty' in 'pq', which is of non-class type 'int' 47 | while(!pq.empty()) | ^~~~~ main.cpp:49:35: error: request for member 'top' in 'pq', which is of non-class type 'int' 49 | pair <int,int> aux=pq.top(); | ^~~ main.cpp:50:16: error: request for member 'pop' in 'pq', which is of non-class type 'int' 50 | pq.pop(); | ^~~ main.cpp:55:30: error: 'egdes' was not declared in this scope; did you mean 'edges'? 55 | int otherEnd=egdes[incEdge].x+egdes[incEdge].y-aux.second; | ^~~~~ | edges main.cpp:60:24: error: request for member 'push' in 'pq', which is of non-class type 'int' 60 | pq.push(make_pair(otherEnd,dist[otherEnd])); | ^~~~ main.cpp: In constructor 'MaxFlow::MaxFlow(Graph)': main.cpp:90:5: error: no matching function for call to 'Graph::Graph()' 90 | { | ^ main.cpp:23:5: note: candidate: 'Graph::Graph(int)' 23 | Graph(int n) | ^~~~~ main.cpp:23:5: note: candidate expects 1 argument, 0 provided main.cpp:16:7: note: candidate: 'Graph::Graph(const Graph&)' 16 | class Graph | ^~~~~ Non zero exit status: 1

Ceva nu functioneaza?