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

Compile Error

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[xpar.first] = {ypar.first,r^xpar.second^ypar.second};
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /u