Problem hld
User justin271828
Submission Time 2024-12-22 22:04:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hld.cpp: In function ‘int main()’:
hld.cpp:75:23: error: request for member ‘insert’ in ‘s’, which is of non-class type ‘std::set<int> [123456]’
75 | for (int k: v[i]) s.insert(preo[k]);}
| ^~~~~~
hld.cpp:103:19: error: request for member ‘end’ in ‘s’, which is of non-class type ‘std::set<int> [123456]’
103 | if (++it == s.end()) tree->up(temp, endo[x], 0-k);
| ^~~
hld.cpp:115:37: error: ‘k’ was not declared in this scope
115 | ans += tree->q(preo[x], preo[y], k);}
| ^
hld.cpp:124:19: error: request for member ‘end’ in ‘s’, which is of non-class type ‘std::set<int> [123456]’
124 | if (++it == s.end()) ans -= tree->q(temp, endo[x]);
| ^~~