Problem cousin
User zyq69
Submission Time 2023-03-24 11:48:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cousin.cpp:17:15: error: invalid declarator before ‘versions’
17 | vector<node*> versions;
| ^~~~~~~~
cousin.cpp: In function ‘void dfs(int, int)’:
cousin.cpp:41:22: error: ‘it’ was not declared in this scope; did you mean ‘int’?
41 | for(auto adjList[it]: x) {
| ^~
| int
cousin.cpp:44:9: error: ‘versions’ was not declared in this scope
44 | versions.push_back(update(versions.back(), 0, nn-1, depth[it]));
| ^~~~~~~~
cousin.cpp: In function ‘void init(int, int*)’:
cousin.cpp:63:5: error: ‘versions’ was not declared in this scope
63 | versions.push_back(create(0, N-1));
| ^~~~~~~~
cousin.cpp: In function ‘int count_cousins(int, int)’:
cousin.cpp:74:19: error: ‘versions’ was not declared in this scope
74 | return queryr(versions[l-1], versions[r], 0, N-1, depth[X]);
| ^~~~~~~