Problem subgraphs
User polyda
Submission Time 2024-10-18 22:13:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

subgraphs.cpp: In function ‘void merge(std::vector<int>&, int, int)’:
subgraphs.cpp:19:20: error: expected ‘;’ before ‘{’ token
19 | else(a[y]<a[x]){
| ^
| ;
subgraphs.cpp: In function ‘int main()’:
subgraphs.cpp:29:15: error: conflicting declaration ‘std::vector<int> a’
29 | vector<int> a(n,-1);
| ^
subgraphs.cpp:27:13: note: previous declaration as ‘int a’
27 | int n, e, a, b;
| ^
subgraphs.cpp:32:14: error: no matching function for call to ‘merge(int&, int&)’
32 | merge(a,b);
| ^
subgraphs.cpp:12:6: note: candidate: ‘void merge(std::vector<int>&, int, int)’
12 | void merge(vector<int>& a, int b, int c){
| ^~~~~
subgraphs.cpp:12:6: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/9/algorithm:62,