Problem dreaming
User Pan
Submission Time 2024-02-23 17:54:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dreaming.cpp: In function ‘int travelTime(int, int, int, int*, int*, int*)’:
dreaming.cpp:70:17: error: invalid initialization of reference of type ‘std::vector<int>&’ from expression of type ‘std::vector<bool>’
70 | dfs(i, dist1, visited);
| ^~~~~~~
dreaming.cpp:37:50: note: in passing argument 3 of ‘void dfs(ll, std::vector<int>&, std::vector<int>&)’
37 | void dfs(ll from, vector<ll>& dist, vector<ll>& visited)
| ~~~~~~~~~~~~^~~~~~~
dreaming.cpp:73:27: error: expected ‘;’ before ‘ll’
73 | visited.assign(n, false)
| ^
| ;
74 | ll first = farest;
| ~~
dreaming.cpp:75:9: error: ‘first’ was not declared in this scope; did you mean ‘farest’?
75 | dist1[first] = 0;
| ^~~~~
| farest
dreaming.cpp:8