Problem doll_noi
User FIips
Submission Time 2025-02-18 07:57:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

doll_noi.cpp:17:15: error: ISO C++ forbids declaration of ‘dsu’ with no type [-fpermissive]
17 | dsu(int n_) : n(n_), num_groups(n_) {
| ^
doll_noi.cpp: In member function ‘int DSU::dsu(long long int)’:
doll_noi.cpp:17:19: error: only constructors take member initializers
17 | dsu(int n_) : n(n_), num_groups(n_) {
| ^
doll_noi.cpp: In member function ‘long long int DSU::qry(long long int, long long int)’:
doll_noi.cpp:63:7: error: expected ‘,’ before ‘-=’ token
63 | ans -= max(even[x + 1], odd[x + 1]);
| ^~~
| ,
doll_noi.cpp:63:8: error: expected identifier before ‘-=’ token
63 | ans -= max(even[x + 1], odd[x + 1]);
| ^~
doll_noi.cpp:63:39: error: expected ‘]’ before ‘;’ token
63 | ans -= max(even[x + 1], odd[x + 1]);
| ^
| ]
doll_n