Problem inheritance
User bobthebill1
Submission Time 2023-02-20 15:38:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

inheritance.cpp:3:13: error: expected initializer before ‘long’
3 | #define int long long
| ^~~~
inheritance.cpp:21:1: note: in expansion of macro ‘int’
21 | int p[10001][1001];
| ^~~
inheritance.cpp: In function ‘long long int fs(long long int, long long int)’:
inheritance.cpp:25:9: error: ‘p’ was not declared in this scope
25 | if (p[i][x]==x) return x;
| ^
inheritance.cpp:26:12: error: ‘p’ was not declared in this scope
26 | return p[i][x] = fs(p[i][x],i);
| ^
inheritance.cpp: In function ‘void ms(long long int, long long int, long long int)’:
inheritance.cpp:30:5: error: ‘p’ was not declared in this scope
30 | p[i][fs(x,i)] = fs(y,i);
| ^
inheritance.cpp: In function ‘int32_t main()’:
inheritance.cpp:43:6: error: ‘el’ was not declared in this scope
43 | el.pb({w,a,b,i});
| ^~
inheritance.cpp:46:19: error: ‘p’