Problem oranges2
User justin271828
Submission Time 2024-12-18 16:41:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

oranges2.cpp: In function ‘int main()’:
oranges2.cpp:19:3: error: ‘v’ was not declared in this scope
19 | v.push_back({w, {a, b}});}
| ^
oranges2.cpp:22:2: error: expected initializer before ‘int’
22 | int roots[N];
| ^~~
oranges2.cpp:23:30: error: ‘roots’ was not declared in this scope
23 | for (int i = 0; i < N; i++) roots[i] = i;
| ^~~~~
oranges2.cpp:29:10: error: ‘roots’ was not declared in this scope
29 | while (roots[x1] != x1) {
| ^~~~~
oranges2.cpp:32:10: error: ‘roots’ was not declared in this scope
32 | while (roots[x2] != x2) {
| ^~~~~
oranges2.cpp:36:3: error: ‘v’ was not declared in this scope
36 | v[p.s.f].push_back({p.s.s, p.f});
| ^
oranges2.cpp:38:16: error: ‘roots’ was not declared in this scope
38 | if (d1 > d2) roots[x2] = roots[x1];
| ^~~~~
oranges2.cpp:3