Problem wormholes
User blackpanther
Submission Time 2025-07-15 22:50:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

wormholes.cpp: In function ‘int main()’:
wormholes.cpp:11:22: error: invalid declarator before ‘p’
11 | vector pair<int,int>p;
| ^
wormholes.cpp:13:9: error: ‘p’ was not declared in this scope
13 | cin>> p[i];
| ^
wormholes.cpp: In function ‘long long int f(long long int)’:
wormholes.cpp:23:30: error: ‘p’ was not declared in this scope
23 | int answer = min(f(n-1)+1,f(p.first(p.second(n))+1);
| ^
wormholes.cpp:24:9: error: ‘answer’ was not declared in this scope
24 | cout<< answer;
| ^~~~~~