0_0_36780413_5718.cpp:93:25: error: 'function' has not been declared
void traverse(int id, function<void(int)> func) {
^
0_0_36780413_5718.cpp:93:33: error: expected ',' or '...' before '<' token
void traverse(int id, function<void(int)> func) {
^
0_0_36780413_5718.cpp: In member function 'void Treap<Key>::traverse(int, int)':
0_0_36780413_5718.cpp:95:23: error: 'func' was not declared in this scope
traverse(lft[id], func); func(id); traverse(rit[id], func);
^
0_0_36780413_5718.cpp: In function 'int main()':
0_0_36780413_5718.cpp:133:78: error: no matching function for call to 'Treap<int>::traverse(int&, main()::<lambda(int)>)'
treap.traverse(treap.root, [&](int id) { ans[idx[id]] = treap.keys[id]; });
^
0_0_36780413_5718.cpp:133:78: note: candidate is:
0_0_36780413_5718.cpp:93:8: note: void Treap<Key>::traverse(int, int) [with Key = int]
void traverse(int id, function<void(int)> func) {
^
0_0_36780413_5718.cpp:93:8: note: no known conversion for argument 2 from 'main()::<lambda(int)>' to 'int'
|