0_0_39829717_32570.cpp: In function 'int calculateProbability(const std::vector<int>&, const std::vector<int>&, int)':
0_0_39829717_32570.cpp:14:5: error: 'function' was not declared in this scope
14 | function<int(int, int)> dp = [&](int l, int r) {
| ^~~~~~~~
0_0_39829717_32570.cpp:4:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
3 | #include <unordered_map>
+++ |+#include <functional>
4 | using namespace std;
0_0_39829717_32570.cpp:14:26: error: expression list treated as compound expression in functional cast [-fpermissive]
14 | function<int(int, int)> dp = [&](int l, int r) {
| ^
0_0_39829717_32570.cpp:14:14: error: expected primary-expression before 'int'
14 | function<int(int, int)> dp = [&](int l, int r) {
| ^~~
0_0_39829717_32570.cpp:33:18: error: 'dp' was not declared in this scope; did you mean 'p'?
33 | int result = dp(0, n - 1);
| ^~
| p
|