Problem wormholes
User pIaceholder
Submission Time 2024-01-15 16:28:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

wormholes.cpp:5:62: error: ‘std::vector’ has not been declared
5 | int solve(std::unordered_map<int, int>& holes, int i, int n, std::vector<int>& dp) {
| ^~~
wormholes.cpp:5:73: error: expected ‘,’ or ‘...’ before ‘<’ token
5 | int solve(std::unordered_map<int, int>& holes, int i, int n, std::vector<int>& dp) {
| ^
wormholes.cpp: In function ‘int solve(std::unordered_map<int, int>&, int, int, int)’:
wormholes.cpp:7:9: error: ‘dp’ was not declared in this scope
7 | if (dp[i] != -1) return dp[i];
| ^~
wormholes.cpp:9:16: error: ‘dp’ was not declared in this scope
9 | return dp[i] = 1 + solve(holes, i + 1, n, dp);
| ^~
wormholes.cpp:11:49: error: ‘dp’ was not declared in this scope
11 | int notake =