Problem sealevel
User Shadow1
Submission Time 2024-03-07 13:40:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sealevel.cpp:32:17: error: expected identifier before ‘&’ token
32 | void dfs(int e, &pair<int,int> u) {
| ^
sealevel.cpp:32:18: error: expected ‘,’ or ‘...’
32 | void dfs(int e, &pair<int,int> u) {
| ^~~~~~~~~~~~~
sealevel.cpp: In function ‘void dfs(int, int&)’:
sealevel.cpp:33:7: error: ‘u’ was not declared in this scope
33 | dist[u] = dist[e] + u.sec;
| ^
sealevel.cpp: In function ‘void solve()’:
sealevel.cpp:51:8: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
51 | dfs(0,1,0);
| ^
sealevel.cpp:32:17: note: in passing argument 2 of ‘void dfs(int, int&)’
32 | void dfs(int e, &pair<int,int> u) {
| ^~~~~~~~~~~~~~