Problem charges
User jeongwonho64
Submission Time 2023-06-04 09:01:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

charges.cpp:6:8: error: ‘x’ was not declared in this scope
6 | pi par(x){
| ^
charges.cpp:6:10: error: expected ‘,’ or ‘;’ before ‘{’ token
6 | pi par(x){
| ^
charges.cpp: In function ‘void merge(int, int, bool)’:
charges.cpp:14:16: error: ‘x’ was not declared in this scope
14 | pi xpar = par(x),ypar = par(y);
| ^
charges.cpp:15:19: error: ‘ypar’ was not declared in this scope; did you mean ‘xpar’?
15 | if(xpar.first == ypar.first)return;
| ^~~~
| xpar
charges.cpp:16:19: error: ‘ypar’ was not declared in this scope; did you mean ‘xpar’?
16 | p[xpar.first] = {ypar.first,r^xpar.second^ypar.second};
| ^~~~
| xpar
charges.cpp:16:55: error: no match for ‘operator=’ (operand types are ‘std::pair<int, bool>’ and ‘<brace-enclosed initializer list>’)
16 | p[xpa