Problem onlineexam
User simonfalke
Submission Time 2023-04-01 18:40:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

onlineexam.cpp: In function ‘std::string exam(int)’:
onlineexam.cpp:9:10: error: ‘function’ is not a member of ‘std’
9 | std::function<void(int, int)> search = [&](int l, int r) {
| ^~~~~~~~
onlineexam.cpp:3:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
2 | #include <vector>
+++ |+#include <functional>
3 |
onlineexam.cpp:9:32: error: expression list treated as compound expression in functional cast [-fpermissive]
9 | std::function<void(int, int)> search = [&](int l, int r) {
| ^
onlineexam.cpp:9:19: error: expected primary-expression before ‘void’
9 | std::function<void(int, int)> search = [&](int l, int r) {
| ^~~~
onlineexam.cpp:27:5: error: ‘search’ was not declared in this scope; did you mean ‘bsearch’?
27 | search(0, N);<