Problem subgraphs
User CKCodeBreaker55
Submission Time 2025-05-22 12:57:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

subgraphs.cpp: In function ‘bool isConnected(long long int, long long int)’:
subgraphs.cpp:12:15: error: too few arguments to function ‘long long int root(long long int, long long int*)’
12 | return root(x) == root(y);
| ^
subgraphs.cpp:5:5: note: declared here
5 | int root(int x, int parent[])
| ^~~~
subgraphs.cpp:12:26: error: too few arguments to function ‘long long int root(long long int, long long int*)’
12 | return root(x) == root(y);
| ^
subgraphs.cpp:5:5: note: declared here
5 | int root(int x, int parent[])
| ^~~~
subgraphs.cpp: In function ‘void connect(long long int, long long int)’:
subgraphs.cpp:17:20: error: too few arguments to function ‘long long int root(long long int, long long int*)’
17 | int rootX = root(x);
| ^
subgraphs.cpp:5:5: note: declared here
5 | int root(int x, int parent[])
|